0
What is wrong with my python code? I get a line 3 stynax error
atomicNumber = input ("") protons = input("") neutrons = 'atomicNumber' - 'protons' print (neutrons)
1 Antwort
0
What you get from input is a string , so you are trying to subtract two strings, which isn't correct.
Just convert what you get from input to a number, ie:
atomicNumber=int(input(''))
and same for protons