Advertisement
Andrey_06

Untitled

Feb 8th, 2025
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. first_num = float(input("Type your first number: "))
  2. second_num = float(input("Type your second number: " ))
  3.  
  4. sum_nums = first_num + second_num
  5. subtract_nums = first_num - second_num
  6. multiply_nums = first_num * second_num
  7. divide_nums = first_num / second_num if second_num != 0 else None
  8.  
  9. type_of_first = type(first_num)
  10. type_of_Second = type(second_num)
  11.  
  12. print(f"Sum: {sum_nums}")
  13. print(f"Subtraction: {subtract_nums}")
  14. print(f"Multiplication: {multiply_nums}")
  15. print(f"Division: {divide_nums}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement