from math import sqrt # Write your solution here while True: number=float(input("Please type in a number:")) if number<0: print("Invalid number!") if number>0: print(sqrt(number)) if number==0: break print("Exiting...") i get answer in integer once i write a number 16 to 4 But i want it 4.0
submitted by /u/Disastrous-Jello1992
[link] [comments]
r/learnpython from math import sqrt # Write your solution here while True: number=float(input(“Please type in a number:”)) if number<0: print(“Invalid number!”) if number>0: print(sqrt(number)) if number==0: break print(“Exiting…”) i get answer in integer once i write a number 16 to 4 But i want it 4.0 submitted by /u/Disastrous-Jello1992 [link] [comments]
from math import sqrt # Write your solution here while True: number=float(input("Please type in a number:")) if number<0: print("Invalid number!") if number>0: print(sqrt(number)) if number==0: break print("Exiting...") i get answer in integer once i write a number 16 to 4 But i want it 4.0
submitted by /u/Disastrous-Jello1992
[link] [comments]