+ 1
Why does the code output 9?
try: num1=input(9) num2=input(3) print(float(num1)) except(SyntaxError, NameError, ValueError, ZeroDivisionError): print(float(num1/num2)) print(int(num1*num2)) except: from math import pi, sqrt as square_roo print(square_root(pi)) finally: from math import pi, sqrt as square_root print(square_root(pi))
2 Antworten
+ 2
get rid of the prompts “9” and “3” in the input to prevent the beginning default message “93” appear in the console.
num1 = input()
num2 = input()
0
Thank you Choe