Questions
Not yet graded
1. Place the correct operators in#, with the wordTruewritten for each
line. Note that==checks for equality.
1
print(16 # 7 == 2)
2
print((7 # 2) # 10 == 35)
3
print(2 # 4 == 0.5)
4
print(5 # 2 # 3 == -1)
5
print(3 # 2 # 1 == 7)
6
2. Consider that the days are represented
asSunday1,Monday2,Tuesday3, etc. Accept thattodayisSunday.
Write the code below to show which day will be82daysfrom now.
(the program must print the6value that representsFriday)
1
3. Accept that your vehicle
goes40miles"per"gallonandthe"cost"of"one"gallonof gas is$
3.65. Write the code below to
printhow"many"miles"you"can"drivewith a$ 25budget. The program
should print the value273.97.
4. Suppose you wait270 minutesfor a meeting (You should get this
value usinginput()function). Write the code below to
printhow"many"hours"and"minutesyou expect intotal. Remember that
it is60 minutesinan"hour. The program should also
print30after4.0.
1