avv210

Learn_Python

May 2nd, 2022 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. # Nathan Version
  2. name = input("enter your name: ")
  3. print("Hello", name + "!")
  4. print("Enter two numbers")
  5. a = int(input("a = "))
  6. b = int(input("b = "))
  7. y = a + b
  8. print("y:", y)
  9. print('The result of ' + str(a) + ' + ' + str(b) + ' is ' + str(y))
  10.  
  11.  
  12. # My Version - Andrew
  13. input_name = str(input('Enter your name: '))
  14. print(f'Hello, {input_name}')
  15. input1 = int(input('Enter first numbers '))
  16. input2 = int(input('Enter second number: '))
  17. res = input1 + input2
  18. print(f'The result of {input1} + {input2} is {res}')
Add Comment
Please, Sign In to add comment