1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
anyanavicka [17]
2 years ago
9

Read two numbers from user input. Then, print the sum of those numbers. Hint - Copy/paste the following code, then just type cod

e where the questions marks are to finish the code. numl - int (input()) num2 = ? print(numl + ?) 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 istof Helpl....docx Essay 1 (1).docx Team Cut
Computers and Technology
1 answer:
Dmitriy789 [7]2 years ago
8 0

Answer:

The full program is:

<em>num1 = int(input()) </em>

<em>num2 = int(input()) </em>

<em>print(num1 + num2)</em>

<em />

Explanation:

Given

<em>num1 = int(input()) </em>

<em>num2 = ?</em>

<em>print(num1 + ?)</em>

<em />

Required

Replace ? with the right codes

Line 1: The syntax is correct

Line 2: The ? should be replaced with an integer input function to get input for num2.

So, the second line would be: <em>num2 = int(input()) </em>

Line 3: The ? should be replaced with num2 in order to calculate and print the required sum.

So, the third line would be: <em>print(num1 + num2)</em>

<em />

You might be interested in
In today's classrooms, computers are generally being used to
Vinvika [58]
The answer is enhance traditional instruction. Computers are often used by teachers so that the teachers may have an easier time with their visual aids. Now that we have tools like powerpoint presentations and excel files, it will be easier for the teachers to prepare 
4 0
3 years ago
Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
padilas [110]

Answer:

The java program for the scenario is given below.  

import java.util.*;

public class Test

{

// method returning sum of all digits in the integer parameter

static boolean anglePairs(int a1, int a2, int a3)

{

   // variable to hold sum of two complementary angles

   int comp=90;  

   // variable to hold sum of two supplementary angles

   int supp=180;

   // boolean variable to hold result

   boolean result = false;

   if( (a1+a2 == comp) || (a2+a3 == comp) || (a1+a3 == comp) )

   {

       if( (a1+a2 == supp) || (a2+a3 == supp) || (a1+a3 == supp) )

           result = true;

       else

           result = false;

   }    

           // return variable result

       return result;

}

public static void main(String[] args)

{

   // method is called by passing three positive angles

   System.out.println("The pair of angles have both complementary and supplementary angles " + anglePairs(100, 80, 90) );    

}

}

OUTPUT

The pair of angles have both complementary and supplementary angles false

Explanation:

The program works as described below.

1. The method, anglePairs(), is declared as static having return type as Boolean which takes three positive integer parameters.

static boolean anglePairs(int a1, int a2, int a3)

{

}

2. The integer variable, comp, is declared and initialized to 90.

3. The integer variable, supp, is declared and initialized to 180.

4. The Boolean variable, result, is declared and initialized to false.

5. Using if-else statements, sum of two angles are compared with the variables, comp and supp.

6. If the sum of any two angles match with both, comp and supp, variables, the Boolean variable, result is assigned value true. Otherwise, result is assigned value false.

7. The value of result is returned.

8. Inside main() method, the function anglePairs() is called and three positive numerical values are passed as parameters.  The output is displayed.

9. All the above code is written inside the class Test.

10. User input is not taken since it is not mentioned in the question.

8 0
3 years ago
Match the following tasks with their appropriate timing.
Oliga [24]

Answer:

3. 1. 2. daily, weekly, monthly

Explanation:

8 0
3 years ago
Which of the following statements is not true of web storage?
slavikrds [6]

Answer:

The data in web storage is passed to the server with every HTTP request.

Explanation:

There are basically two Web storage APIs Session storage and local storage.Both can store data up to 5MB. They are supported by every modern browser.You can store data in local storage indefinitely and for browser session in session storage.There is no data or information in HTTP request header.So we conclude that option 4 is the answer.

3 0
2 years ago
Suppose we have two String objects and treat the characters in each string from beginning to end in the following way: With one
Simora [160]

Answer:

If all the character pairs match after processing both strings, one string in stack and the other in queue, then this means one string is the reverse of the other.                            

Explanation:

Lets take an example of two strings abc and cba which are reverse of each  other.

string1 = abc

string2 = cba

Now push the characters of string1 in stack. Stack is a LIFO (last in first out) data structure which means the character pushed in the last in stack is popped first.

Push abc each character on a stack in the following order.

c

b

a

Now add each character of string2 in queue. Queue is a FIFO (first in first out) data structure which means the character inserted first is removed first.

Insert cba each character on a stack in the following order.

a   b   c

First c is added to queue then b and then a.

Now lets pop one character from the stack and remove one character from queue and compare each pair of characters of both the strings to each other.

First from stack c is popped as per LIFO and c is removed from queue as per FIFO. Then these two characters are compared. They both match

c=c. Next b is popped from stack and b is removed from queue and these characters match too. At the end a is popped from the stack and a is removed from queue and they both are compared. They too match which shows that string1 and string2 which are reverse of each other are matched.

6 0
3 years ago
Other questions:
  • Plato :
    14·2 answers
  • Liz will use a CD-R compact disk to write to more than once. Carlo will use a CD-RW compact disk to write to more than once. Who
    8·2 answers
  • Which of the following is something that scientists often seek by using computer models and simulations?
    8·2 answers
  • Which are appropriate uses for special effects in presentations?
    14·1 answer
  • Infrared, a wireless connection used in the past prior to bluetooth, was limited because it ________.
    10·1 answer
  • An advertiser who sells coffee beans adds the keyword "Java'" to an ad group. After two weeks, she runs a placement performance
    11·1 answer
  • What part of the code is a signal for the function to execute and pass back a value?
    11·2 answers
  • Explain briefly the purpose of the Computer Management Console in Microsoft Windows.
    12·1 answer
  • 6. A rental car agency classifies the vehicles it rents into four categories: compact, midsize, full-size, and sport utility. Th
    11·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!