!Chapter 2 Problem 1
!Chapter 2 Problem 2
!Chapter 2 Problem 3
!Chapter 2 Problem 4
!Chapter 2 Problem 5
!Chapter 2 Problem 6
!Chapter 2 Problem 7
!Chapter 2 Problem 8
!Chapter 2 Problem 9
!Chapter 2 Problem 10
!Chapter 2 Problem 11
!Chapter 2 Problem 12
!Iliya Smithka
!Pd. 7
INPUT Prompt "Temperature in Farenheit:":farenheit
LET celsius=5*(farenheit-32)/9
LET final=round(celsius,1)
PRINT "The corresponding temperature (to";farenheit;") in degrees Celsius"
PRINT "is";final;"."
END
!Iliya Smithka
!Pd. 7
INPUT Prompt "Distance in inches:":distancea
INPUT prompt "Distance in feet:" :distanceb
LET centimeters=2.54*distancea+2.54*distanceb*12
PRINT "The corresponding distance (to";distanceb
PRINT "inches and";distancea;"inches") in centimeters"
PRINT "is";centimeters;"."
END
!Iliya Smithka
!Pd. 7
PRINT "What are your monthly sales (in dollars)";
INPUT monsales
READ rate
DATA .07
LET totalcom=monsales*rate
PRINT "Your total commission is $";totalcom
PRINT "if your monthly sales are";monsales"."
END
!Iliya Smithka
!Pd. 7
PRINT "What is your item";
INPUT item$
PRINT "What is the list price (in dollars) of the "; item$;
INPUT listprice
PRINT "What is the percent that "; item$
PRINT " is being discounted (from its original ";listprice;" dollars)";
INPUT discount
LET reald=(discount/100)*listprice
LET itemend=listprice-reald
PRINT "The "; item$; ", originally "; listprice
PRINT " dollars, discounted at "; discount
PRINT " % costs, meaning a discount of";reald
PRINT "dollars and a total price of"; itemend; " dollars."
END
!Iliya Smithka
!Pd. 7
READ name$
READ score1, score2
DATA Fred
DATA 90, 78
LET avgscore=(score1+score2)/2
PRINT name$;"'s first test score was ";score1
PRINT " and his second test score was ";score2
PRINT " so his average score was ";avgscore;"."
END
!Iliya Smithka
!Pd. 7
INPUT prompt "How much was the car loan for?": loan
INPUT prompt "What's your annual interest rate?": irate
INPUT prompt "How many monthly payments do you have to make?": nomonpay
LET monpay=(loan*(irate/1200))*((1+(irate/1200))^nomonpay)/(((1+(irate/1200))^nomonpay)-1)
PRINT "You'll have to pay";monpay;" every month to pay"
PRINT " off a car loan of";loan;"dollars at an"
PRINT " annual interest rate of";irate*1200
PRINT "percent for";nomonpay;"months."
END
!Iliya Smithka
!Pd. 7
INPUT prompt "Name of product:": item$
INPUT prompt "Unit price of item:": price
INPUT prompt "Weight in pounds:": lbs
INPUT prompt "Weight in ounces:": oz
LET lbstooz=lbs*16
LET priceperoz=price/(lbstooz+oz)
PRINT "The price per ounce of the ";item$;" is"
PRINT " priceperoz;"dollars."
END
!Iliya Smithka
!Pd. 7
INPUT prompt "Name of product:": item$
INPUT prompt "Unit price of item:": price
INPUT prompt "Weight in pounds:": lbs
INPUT prompt "Weight in ounces:": oz
LET lbstooz=lbs*16
LET priceperoz=(price-(price*.15))/(lbstooz+oz)
LET pwd=price*.15
PRINT "The price per ounce of the ";item$
PRINT " with a 15% discount (";pwd;"dollars) is ";priceperoz;"dollars."
END
!Iliya Smithka
!Pd. 7
INPUT prompt "Employee:": name$
INPUT prompt "ID Number:": id
INPUT prompt "Number of hours worked:": hours
INPUT prompt "Overtime hours worked:": othours
INPUT prompt "Pay rate per hour:": rate
LET pay=(rate*hours)+(rate*(othours*1.5))
PRINT "Employee:"; name$
PRINT "ID Number"; id
PRINT "Number of hours worked:"; hours
PRINT "Overtime hours worked:"; othours
PRINT "Pay rate per hour:"; rate
PRINT "Gross pay:"; pay
END
!Iliya Smithka
!Pd. 7
INPUT prompt "Employee: ": name$
INPUT prompt "ID Number:": id
INPUT prompt "Number of hours worked: ": hours
INPUT prompt "Overtime hours worked: ": othours
INPUT prompt "Pay rate per hour:": rate
LET pay=(rate*hours)+(rate*(othours*1.5))
LET total=(pay*.3+pay)-10
PRINT "Employee: "; name$
PRINT "ID Number:"; id
PRINT "Number of hours worked: "; hours
PRINT "Overtime hours worked: "; othours
PRINT "Pay rate per hour: "; rate
PRINT "Gross pay:"; total
END
!Iliya Smithka
!Pd. 7
INPUT prompt "Sharon's first score: ": sscore1
INPUT prompt "Sharon's second score: ": sscore2
INPUT prompt "Sharon's third score: ": sscore3
INPUT prompt "Judy's first score: ": jscore1
INPUT prompt "Judy's second score: ": jscore2
INPUT prompt "Judy's third score: ": jscore3
LET savg=(sscore1+sscore2+sscore3)/3
LET javg=(jscore1+jscore2+jscore3)/3
LET tscore=sscore1+sscore2+sscore3+jscore1+jscore2+jscore3
PRINT "Sharon's average for her three games was ";savg;"."
PRINT "Judy's average for her three games was ";javg;"."
PRINT "Their team's (Sharon and Judy) score"
PRINT " for the six games was ";tscore;"."
END
!Iliya Smithka
!Pd. 7
READ pwin, plose
READ uwin, ulose
READ ptwin, ptlose
READ wswin, wslose
DATA 11, 0
DATA 6, 6
DATA 4, 6
DATA 0, 9
LET pcent=(pwin/(pwin+plose))*100
LET ucent=(uwin/(uwin+ulose))*100
LET ptcent=(ptwin/(ptwin+ptlose))*100
LET wscent=(wswin/(wswin+wslose))*100
PRINT "The Pandas won";pwin;"games and lost";plose;"games."
PRINT "The percent of games that they won is";pcent;"."
PRINT "The Unicorns won";uwin;"games and lost";ulose;"games."
PRINT "The percent of games that they won is";ucent;"."
PRINT "The Pterodactyls won";ptwin;"games and lost";ptlose;"games."
PRINT "The percent of games that they won is";ptcent;"."
PRINT "The White Sox won";wswin;"games and lost";wslose;"games."
PRINT "The percent of games that they won is";wscent;"."
END