Python ask for two numbers and print the sum
Apr 24, 2021
The challenge is to ask the user for two numbers and print the sum. This makes use of the functions print, input, int and the addition operator to add the two numbers.
Below is the sample solution and some important takeaways.
first_number , second_number, sum_of_nums are variables.
the input function receives input from the keyboard and always returns a string
to perform any further meaningful mathematical operations the string is first converted to integer using int()