SimeonTs

SUPyF2 Basic Exercise - 03. Leonardo DiCaprio Oscars

Sep 24th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. """
  2. Basic Syntax, Conditional Statements and Loops - Exercise
  3. Check your code: https://judge.softuni.bg/Contests/Compete/Index/1719#2
  4. Video: https://www.youtube.com/watch?time_continue=4&v=7sHE4HEUqi8
  5.  
  6. SUPyF2 Basic Exercise - 03. Leonardo DiCaprio Oscars
  7.  
  8. Problem:
  9. Write a program that receives a single integer number and prints different messages depending on the number:
  10. -   If Oscar is 88 - "Leo finally won the Oscar! Leo is happy".
  11. -   If Oscar is 86 - "Not even for Wolf of Wall Street?!"
  12. -   If Oscar is not 88 nor 86 (and below 88) - "When will you give Leo an Oscar?"
  13. -   If Oscar is over 88 - "Leo got one already!"
  14.  
  15. Examples:
  16. Input:  Output:
  17. 88      Leo finally won the Oscar! Leo is happy
  18. 86      Not even for Wolf of Wall Street?!
  19. 81      When will you give Leo an Oscar?
  20. 89      Leo got one already!
  21. """
  22. oscar = int(input())
  23.  
  24. if oscar == 88:
  25.     print("Leo finally won the Oscar! Leo is happy")
  26. elif oscar == 86:
  27.     print("Not even for Wolf of Wall Street?!")
  28. elif oscar < 88:
  29.     print("When will you give Leo an Oscar?")
  30. else:
  31.     print("Leo got one already!")
Add Comment
Please, Sign In to add comment