A branch that changes the tested value

A teacher adjusts quiz scores with the Python program below. Students who scored 50 or more receive 10 bonus points, and everyone else receives 25 bonus points.


Python
score = int(input("Score: "))
if score >= 50:
    score = score + 10
else:
    score = score + 25
print(score)


Give the number printed for each of the three inputs below, as a whole number.

  • Input 40
  • Input 49
  • Input 50
Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Decision Statements Questions: