Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Write program here :)
- from time import sleep
- from random import randint
- def haiku():
- print("I don't know")
- sleep(1)
- print("What a haiku is")
- sleep(1)
- print("I assume")
- sleep(1)
- print("It's a short poem")
- sleep(1)
- print("That doesn't have to rhyme")
- sleep(2)
- def area():
- print("\nWe will now calculate the area of a triangle")
- base = input("Please enter the base of the triangle in cm:")
- height = input("Please enter the height of the triangle in cm:")
- area = (float(base) * float(height))/2
- print("The area is " + str(round(area,2)) + " cm2")
- sleep(2)
- def coin_flip():
- print("\nWe will now toss a coin and see the outcome")
- sleep(2)
- outcome = randint(1,2)
- if outcome == 1:
- print("Heads")
- else:
- print("Tails")
- start = input("Press enter to start the haiku")
- haiku()
- area()
- coin_flip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement