63 838
Assignments Done
99,2%
Successfully Done
In August 2018

Answer to Question #21159 in Python for jean

Question #21159
write a python program that asks the user to enter a number of books that he or she has purchased this month and displays the number of points awarded

0 book = 0 point
1 book= 5 points
2 books = 15 points
3 books = 30 points
4 books = 60 points
Expert's answer
num = int(raw_input('Enternumber of books: '))
if num == 0:
print 'Points: 0'
elif num == 1:
print 'Points: 5'
elif num == 2:
print 'Points: 15'
elif num == 3:
print 'Points: 30'
elif num == 4:
print 'Points: 60'
else:
print 'Points: ???'

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions