0

'line 4, in <module> print(first + second) NameError: name 'first' is not defined ' the compiler said.

def addition(): first= int(input('what is your first number')) second = int(input('What is your second number?')) print(first + second) addition()

19th Oct 2020, 1:02 PM
Ar Kar Moe
Ar Kar Moe - avatar
1 Antwort
+ 3
def addition(): first= int(input('what is your first number')) second = int(input('What is your second number?')) print(first + second) addition() wrong indentation
19th Oct 2020, 1:05 PM
Julia Shabanova
Julia Shabanova - avatar