+ 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 Answers
+ 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