Hey I am new to programming so sorry if I am dumb.
print("1st number")
a = input()
print("2nd number")
b = input()
s = (a ++ b)
print(s)
If I put 1 in for both numbers it outputs 11 not 2
Hey I am new to programming so sorry if I am dumb.
print("1st number")
a = input()
print("2nd number")
b = input()
s = (a ++ b)
print(s)
If I put 1 in for both numbers it outputs 11 not 2
You need to cast the input string to a number:
print("1st number")
a = input()
print("2nd number")
b = input()
s = float(a) + float(b)
print(s)
or int() for an integer casting.