SimeonTs

SUPyF2 Basic Exercise - 01. Jenny's Secret Message

Sep 24th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 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#0
  4. Video: https://www.youtube.com/watch?time_continue=4&v=7sHE4HEUqi8
  5.  
  6. SUPyF2 Basic Exercise - 01. Jenny's Secret Message
  7.  
  8. Problem:
  9. Jenny studies programming with python and wants to create a program that greets a user when he/she gives his/her name.
  10. Jenny however is in love with Johnny, and would like to greet him differently. Can you help her?
  11. Examples:
  12.  
  13.    Input:
  14. Peter
  15.    Output:
  16. Hello, Peter!
  17.  
  18.    Input:
  19. Amy
  20.    Output:
  21. Hello, Amy!
  22.  
  23.    Input:
  24. Johnny
  25.    Output:
  26. Hello, my love!
  27. """
  28.  
  29. name = input()
  30.  
  31. if name == "Johnny":
  32.     name = "my love"
  33.  
  34. print(f"Hello, {name}!")
Add Comment
Please, Sign In to add comment