Advertisement
Spocoman

10. Multiply by 2

Dec 22nd, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. while True:
  2.     number = float(input())
  3.     if number >= 0:
  4.         print(f"Result: {number * 2:.2f}")
  5.     else:
  6.         print("Negative number!")
  7.         break
  8.  
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement