+ 2
Can someone help me? I can't find the problem. Plss🥺
nom1 = input("") operator = input("") nom2 = input("") if operator == "+": result= nom1+nom2 print(result) elif operator=="-": result=nom1-nom2 print(result) elif operator =="*": result=nom1*nom2 print(result) elif operator =="/": result=nom1/nom2 print (result) else: print("error")
4 Respostas
+ 7
please note that the input is always a string. if you want a num (int = integer) you have to convert the input.
https://code.sololearn.com/c0pPk83UOfVo/?ref=app
+ 2
Thank u!!
+ 1
Try
nom1 = int(input())
nom2 = int(input())
Or
Result = int(nom1) + int(nom)2
+ 1
Sololearn does not support multiple separated inputs, so you must insert your multiple inputs in same input, separated by a newline
Like this
12
+
12