16. Write a python program to help the teacher to sum up the exam paper of part I and part II after that print out the result whether pass or fail. (Passing mark: 60)
The output is:
Expected Sample Answer 1:
Please input machine learning Part I marks:
30
Please input machine learning Part II marks:
45
Congratulation, Pass!
Expected Sample Answer 2:
Please input machine learning Part I marks:
10
Please input machine learning Part II marks:
12
Fail!
Sample Answer:
print("Please input machine learning Part I marks:") x = int(input()) print("Please input machine learning Part II marks:") y = int(input()) if x + y > 60: print("Congratulation, Pass!") else: print("Fail!"))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)