Ask Question
12 June, 07:59

Read two numbers from user input. Then, print the sum of those numbers. Hint - - Copy/paste the following code, then just type code where the questions marks are to finish the code. num1 = int (input ()) num2 = ? print (num1 + ?) Note: Our system automatically runs your program several times, trying different input values each time to ensure your program works for any values. Notes on how to solve this. See How to Use zyBooks for info on how our automated program grader works

+1
Answers (2)
  1. 12 June, 11:20
    0
    num1 = int (input ("Enter the first number "))

    num2 = int (input ("Enter the first number "))

    print (num1 + num2)

    Explanation:

    Using Python programming language.

    The input function is used to prompt a user to enter the first and sencond numbers

    These are saved in the variables num1 and num2 respectively.

    Using the print function, the sum of num1 and num2 are evaluated and printed
  2. 12 June, 11:50
    0
    The solution code is written in Python 3:

    num1 = int (input ("Enter first number: ")) num2 = int (input ("Enter second number: ")) print (num1 + num2)

    Explanation:

    Firstly, we use input function to prompt user input first and second number (Line 1 - 2). We can include the prompt message as the argument of input function. Besides, we also convert the input to integer type using int () function. By default all the input are string.

    At last, use print function to display the result of num 1 + num2 (Line 3)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Read two numbers from user input. Then, print the sum of those numbers. Hint - - Copy/paste the following code, then just type code where ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers