Python 7 Levels, L2, Unit 10, if Statement

Powered By EmbedPress

Exercise 1:

score = int(input("Please input your score:"))
if score > 90:
    print("Excellent!")
    print("Please go to the office for gift!")
print("Test.")

Exercise 2:

print("Course Registration Program.")
python = input("Do you like Python Programming?(y/n)")
if python == "y":
    print("Please go to classroom 101 for registration")
robot = input("Do you like Robot Competitions?(y/n)")
if robot == "y":
    print("Please go to classroom 102 for registration")
soccer = input("Do you like Soccer?(y/n)")
if soccer == "y":
    print("Please go to classroom 103 for registration")
print("Course Registration Program. ")

Homework:

one = 5
two = 9
three = 12
number = int(input("Please guess a number between 0 and 20:"))
if number == 5:
    print("Congratulations. First Award")
if number == 9:
    print("Congratulations. Second Award")
if number == 12:
    print("Congratulations. Third Award")
print("Guess Number")

dahan1999

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts