Ask Question
21 December, 02:13

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

+5
Answers (2)
  1. 21 December, 02:31
    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. 21 December, 06:12
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers