8 September - 14 September Week 2
L2-Problem-1:Passed or failed Instructions: Write a program that outputs the message “passed” or “failed” based on user’s input. If the user enters the number in range [50,100] program must print out message “passed”, if number is in the range [0, 50) program prints out the message “failed”, otherwise program must print out “Incorrect grade!”. Input : Enters his/her grade. Output : Passed , failed or Incorrect grade! Example: >>> 50
Passed
>>> 15
Failed
>>> -9
Incorrect grade! mark = int(input()) if mark >= 50 and mark <=100: print('Passed') elif mark <0 or mark >100: print('Incorrect...