Exercise 1:
score1 = int(input("Please input your English score:"))
score2 = int(input("Please input your Math score:"))
if score1 > 90 and score2 > 90:
print("Excellent!")
print("Please go to Admin Office for gift.")
print("Achievement test.")
Exercise 2:
number = int(input("Please guess a number between 0 and 20:"))
if number == 5:
print("Congratulations! You Win First Prize.")
if number == 3 or number == 9:
print("Congratulations! You Win Second Prize.")
if number == 12 or number == 13 or number == 19:
print("Congratulations! You Win Third Prize.")
print("Guess Number Game")
Homework:
score = int(input("Please input score of this month:"))
result = input("Have you finished your homework of this week?(yes/no)")
if score > 280 and result == "yes":
print("You can play one hour video game.")
print("Test you can play video game or not.")
[…] Level 2| |____Unit 9 bool data type and relational operators| |____Unit 10 if statement| |____Unit 11 Logical Operators| |____Unit 12 Priority of Operators| |____Unit 13 if else statement| |____Unit 14 Multiple if […]