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 grade!') else: print('Failed') L2-Problem-2: Division Instructions: Input: Dividend and divisor are entered by the user on new lines. Output: The quotient will be printed in a new line. Example: >>> Enter a dividend: 63
Enter a divisor: 7
Quotient is : 9
>>> Enter a dividend: 10
Enter a divisor: 5
Quotient is : 2
>>> Enter a dividend: 5
Enter a divisor: 0
Incorrect in