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
Kaylis [27]
3 years ago
11

Sum.Write a program that prompts the user to read two integers and displays their sum.Your program should prompt the user to rea

d the number again if the input is incorrect.
Computers and Technology
1 answer:
adelina 88 [10]3 years ago
7 0

Answer:

while True:

   number1 = input("Enter the number1: ")

   number2 = input("Enter the number2: ")

   

   if number1.isnumeric() and number2.isnumeric():

       break

 

number1 = int(number1)

number2 = int(number2)

print("The sum is: " + str(number1 + number2))

Explanation:

*The code is in Python.

Create an infinite while loop. Inside the loop, Get the number1 and number2 from the user. Check if they are both numeric values. If they are, stop the loop (Otherwise, the program keeps asking for the numbers).

When the loop is done, convert the numbers to integer numbers

Calculate and print their sum

You might be interested in
A _______ is conducted to determine the adequacy of system controls, ensure compliance with established security policy and proc
kow [346]

Answer:

security audit

Explanation:

7 0
3 years ago
Djdjdjdjdjdjdjdjdjjdjdjdjdjdjdjdjdjdjdj
DanielleElmas [232]
Shorty a bad bleep .
7 0
3 years ago
Read 2 more answers
Which lighting direction is used to create silhouettes
Elena L [17]
The answer is backlighting
5 0
2 years ago
Provide an example of a question that could NOT be answered with a binary message. Explain why this is the case, making referenc
solong [7]
This is a question with a much simpler answer given its open ended ness - a representation merely means, given binary data, we can determine what 'thing' that binary data corresponds to.

<span>That makes the question unanswerable, because words can all be represented in binary data, and the question cannot be answered without those. Thus, all answers we can convey have a binary representation of some form (that form being the translation of the words we used to communicate the answer into binary data).</span>
7 0
3 years ago
How were images captured before the invention of the camera?
xeze [42]

Answer:

The British inventor Fox Talbot produced his first successful photographic images in 1834, without a camera, by placing objects onto paper brushed with light-sensitive silver chloride, which he then exposed to sunlight.

Explanation:

5 0
2 years ago
Other questions:
  • To change to the completed application’s directory, we opened a command window and used the ________ command to change to the di
    7·1 answer
  • How is a cell named?
    12·1 answer
  • To expand a window to the full size of the screen.​
    6·2 answers
  • A web page ____ can also create a style sheet that takes precedence over the internal style sheets of browsers.
    10·1 answer
  • Which cost of purchasing a franchise would you still have if you start your own business​
    12·1 answer
  • Is a biometric system an input, output, storage or soft device?​
    6·1 answer
  • Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for l
    9·1 answer
  • If I am working in a document and wish to follow a hyperlink, what should I do?
    7·1 answer
  • To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to bu
    7·1 answer
  • How do i delete cookies on a chromebook?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!