Python Forum
Homework on conditional execution
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Homework on conditional execution
#1
Please how do i make my computation stay in the range between 0.0 and 1.0
score = input('Enter a score: ')
if float(score) > 1.0
    print('Bad score')
if float(score) >= 0.9:
    print('A')
elif float(score) >= 0.8:
    print('B')
elif float(score) >= 0.7:
    print('C')
elif float(score) >= 0.6:
    print("D")
elif float(score) < 0.6:
    print('F')
elif float(score) < 0.0
    print('bad score')
else:
    print('Bad score')
Reply


Messages In This Thread
Homework on conditional execution - by Philippa - Jan-03-2020, 01:08 PM
RE: Homework on conditional execution - by DeaD_EyE - Jan-03-2020, 03:05 PM
RE: Homework on conditional execution - by Philippa - Jan-08-2020, 08:33 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020