+ 1

Help with python

how yo use the inputs?

11th Dec 2017, 1:00 PM
Nathaniel Robles
Nathaniel Robles - avatar
2 Answers
+ 5
Assuming you require help with the input() function... Here's a sample: def add(x, y): return x + y first = int(input("Enter first number: ")) #Gets input from user and converts to integer, under the prompt of 'Enter first number'. second = int(input("Enter second number: ")) #Same thing print(add(first, second)) #Outputs the sum of the two variables specified by the user. Hope this helped! 😉
11th Dec 2017, 1:33 PM
blackcat1111
blackcat1111 - avatar
+ 1
thank you very much that was the same thing I wanted to know
11th Dec 2017, 1:38 PM
Nathaniel Robles
Nathaniel Robles - avatar