-3
a = input ('Primeiro número: ')
b = input ('Segundo número: ')
c = a+b
d = a-b
e = a*b
f = a**b
g = a//b
h = a%b
print('a = ' , a , '\nb = ' , b , '\na + b = ', c , '\na - b = ', d , '\na * b = ', e , '\na ** b = ', f , '\na // b = ', g , '\na % b = ' , h)
When I run and put the two numbers, it appears to this:
Traceback (Most recent call last):
File "C:/Users/SONY/Desktop/Python/lesson 1.py", line 4, in d = a-b
Typeerror: Unsupported operand type(s) for -: 'str' and 'str'
This answers your question? Error: Unsupported operand type(s)
– Cmte Cardeal
dup: Python Spent Fuel Exercise
– Cmte Cardeal