kevinbocky Jan 22nd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #define the haiku funtion
- def haiku():
- from time import sleep
- haiku_line1 = "Relax, the future"
- haiku_line2 = "is already unfolding"
- haiku_line3 = "from long-planted seeds"
- #define the triangle function, to calculate the surface area
- def triangle():
- base = input("Enter the base measurement of the triangle in cm ")
- height = input("Enter the height measurement of the triangle in cm ")
- surface = 0.5 * int(base) * int(height)
- print(str(surface) + " cm3 ")
- #define the coin flip function, it must ramdonly generate an outcome
- def coin_flip():
- import random
- print("Lets flip a coin")
- option = ["Heads", "Tails"]
- result = random.choice(option)
- print("The result is " + result)
RAW Paste Data