>>> x=input("Enter a string")
Enter a string ayman
>>> x
' ayman'
>>> y=input("Enter your name: ")
Enter your name: Ayman
>>> x
' ayman'
>>> y
'Ayman'
>>> x=input("Enter a string")
Enter a string5
>>> x
'5'
>>> y=int(input("Enter a number"))
Enter a number8
>>> y
8
>>> y+int(x)
13
Enter a string ayman
>>> x
' ayman'
>>> y=input("Enter your name: ")
Enter your name: Ayman
>>> x
' ayman'
>>> y
'Ayman'
>>> x=input("Enter a string")
Enter a string5
>>> x
'5'
>>> y=int(input("Enter a number"))
Enter a number8
>>> y
8
>>> y+int(x)
13
Now why we got an error in y+x??
please comment the reason
please comment the reason
No comments:
Post a Comment