Q. Consider the following code segment:

a = input("Enter the value of a:")

b = input("Enter the value of b:")

print(a + b)

If the user runs the program and enters 11 for a and 9 for b then what will the above code display.


Answer =

Enter the value of a: 11
Enter the value of b: 9
119

>>> 

Explanation :-  

Here values of a and b are String which are simply joined to each other.

4 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post