Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. poem = ["Have we not known, nor heard, nor read",
  2. "How God does hate deceit and wrong?",
  3. "How Ananias was struck dead,",
  4. "Caught with a lie upon his tongue?"]
  5. def display_haiku():
  6. for line in poem:
  7. print(line)
  8.  
  9. display_haiku()
  10.  
  11. def triangle_area():
  12. height = float(input('Enter the height of the triangle: '))
  13. base = float(input('Enter the base of the triangle: '))
  14. area = 1/2 * height * base
  15. print('The area of the triangle is:',area)
  16.  
  17. triangle_area()
  18.  
  19. import random
  20.  
  21. def heads_or_tails():
  22. r =random.randint(0,1)
  23. if r == 0:
  24. print('heads')
  25. if r == 1:
  26. print('tails')
  27.  
  28. heads_or_tails()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement