Popular in Intro To Computer Science 1
Popular in ComputerScienence
This 0 page Bundle was uploaded by Maya Notetaker on Monday November 23, 2015. The Bundle belongs to 1500-03 at Tulane University taught by Kurdia, Anastasia in Summer 2015. Since its upload, it has received 43 views. For similar materials see Intro To Computer Science 1 in ComputerScienence at Tulane University.
Reviews for Lab 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 11/23/15
quotquotquotName Maya Pelichet Course CMPS 1500 Lab Section Tuesday 2315 pm Assignment Lab 1 Part 0 Date 090615 def area radius quotquotquotCalculates the area using the given value then executes circle formula by raising area to the second power and lastly multiplying that value by pi to calculate the circle39s area PI 314159 approximate PI area radius 2 PI define formula for area return area returns funtion to next statement def costperinch diameter price quot39Calculates the cost per inch by first calculating the area of the pizza and then dividing the calculated area by the price of the pizzaquot39 define and call function to order function has two parameters of radius and price PI 314159 approximate PI radius diameter 2 define radius using the parameter diameter totalarea radius 2 PI assign new variable total area with value of the formula for area of a circle totalcostperinch price totalarea divdes price by total area return totalcostperinch returns function to next statement diameter float input39Please enter the diameter of your pizza in inches39 price float input39Please enter its cost in dollars39 variables of price and diameter are assigned with input from to be used in the previously defined print 39The cost is39 round costperinch diameter price 2 39dollars per square inch 39 final statement is printed and value is rounded to 2 decimal places quotquotquotName Maya Pelichet Course CMPS 1500 Lab Section Tuesday 2315 pm Assignment Lab 1 Part 1 Date 090815quotquotquot def creditchargevalue quot39Calculates the charge on the customers purchase by assigning value that equates miniumum charge to purchases less than 83333 and multiplies purchases greater than 833 by 003 to calculate the chargequot39 if value lt 83333333333333 value 25 else value value 003 return value def salestaxvalue quotquotquotCalculates the sales tax by multiplying the value by a different percentage depending on the value39s range if value lt 20 value value 004 elif value gt 20 and value lt 100 value value 003 else value value 002 return value value float input39Please enter transaction amount in dollars39 allows user to input a value that is to be used in previously defined functions amountrecieved value salestax value creditcharge value print creditchargevalue calculates final amount that the merchant recieved print quotAmount recived by the merchant isquot round amountrecieved 2 prints amount recieved quotquotquotName Maya Pelichet Course CMPS 1500 Labe Section Tuesday 2315 pm Assignment Lab 1 Part 2 Date 090715 answer input Do your prefer the metric system or the imperical system If imperical enter 39139 and if metric enter 39239 Asks the user the first question using the answers 1 and 2 for respectively imperical and metric works better because we haven39t learned how to make the input that the users give us casesensitive thus metric is a different answer than Metricquot if answer quot1 def inputimperial quotquotquotComputes the weight and height from input using imperical measurements w float input39Please enter your weight in pounds39 h float input39Please enter your height in inches39 lst w h return lst assigns variable lst to the value of the function inputimperial lst inputimperial if answer quot2quot def inputmetric quotquotquotComputes the weight and height from input using metric measurements w float input39Please enter your weight in kilograms39 h float input39Please enter your height in centimers39 w w 220462 h h 0393701 lst w h return lst reassigns variable lst to the value of the function inputmetric lst inputmetric assigns variables of w and h to the respective indexes of lst in the function inputimperial w lst 0 h lst 1 def computebmiwh quotquotquotcomputes the bmi of the inputmetric and computebmi functions depending on initial input of the user using variables w and h abovequot bmi w 720 h 2 return bmi bmi computebmiwh assigns value it can be used in the function evaluatebmi def evaluatebmibmi quotquotquotEvaluates bmi range depending on mulitple sets of criteria if bmi value is true for a certain criteria it will print the coordinating answer of below within or above a healthy range if bmi lt 19 print quotYour bmi is below a healthy rangequot elif 19lt bmi lt 25 print Your bmi is within a healthy rangequot else print Your bmi is above a healthy rangequot return evaluatebmibmi quotunName Maya Pelichet Course CMPS 1500 Lab Section Tuesday 23 15 Assignment Lab 1 Part 3nnn Scanerios in which diversity affects software development 1Language barriers If a software developer is from America and only speaks English he or she would make the software from his or her personal perspective In english there isn39t the same punctuation syntax etc that other languages have An englishspeaking American might not be knowledgable enough to include considerations like this when making passwords or short cuts and other various software development functions that pertain to lanuages other than english 2Gender barriers If a software developer is male he may not develop his software in a way that is considerate of females The same can be said for a developer who is female that may not be considerate of the software development that pertains to males What looks good works functions etc varies in the opinions of fe males and males thus it is necessary to have gender diversity 3Geographic Origin If a software developer is developing software for a place that he or she isn39t from it would be right to assume that the idosyncracies culture identity etc of that place won39t be incorporated into the software The software developer will design the software from the perspective of where he or she is from which might not necessarily work in the area he or she is designing software in 4 Age Differences A older software developer may not be mindful of current pop culture current events etc that pertain to the youth Thus it is necessary to incorporate age diversity to create software that appeals to all age groups
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'