This is the presentation associated with the Python input() function video.
[dflip id=”1615″][/dflip]
Python input() Function Video Question
This is the Question that was asked in the python input() function video
Question : Write a program to input two number and display the sum in output. This task has to be achieved in a single line.
Hint: You can use the int() for typecasting.
[bg_collapse view=”button-blue” color=”#ffffff” icon=”eye” expand_text=”Show Answer” collapse_text=”Hide Answer” ]
In [1]:
print("Sum:", int(input("Please enter first number:")) + int(input("Please enter second number:")))
[/bg_collapse]