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
def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user account
laiz [17]

Answer:

def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user accounts. bank is a dictionary where the key is the username and the value is the user's account balance. log_in is a dictionary where the key is the username and the value is the user's log-in status. amount is the amount to be transferred between user accounts (userA and userB). amount is always positive. What you will do: - Deduct the given amount from userA and add it to userB, which makes a transfer. - You should consider some following cases: - userA must be in the bank and his/her log-in status in log_in must be True. - userB must be in log_in, regardless of log-in status. userB can be absent in the bank. - No user can have a negative amount in their account. He/she must have a positive or zero balance. Return True if a transfer is made. For example:

Explanation:

i know this much

8 0
3 years ago
Which of the following option is not available in Insert>>Picture?
zysi [14]

Answer:

Word art

Explanation:

its copy and paste

7 0
3 years ago
Read 2 more answers
.9 What is Artificial Intelligence?
Serhud [2]
C because bread is not happy with you
8 0
3 years ago
What type of thinking work does the computer need to do to solve the problem?
poizon [28]

Answer:

<h3>Computational Thinking is the thought processes involved in formulating a problem and expressing its solution in a way that a computer—human or machine—can effectively carry out.</h3>

Pa brainliest po

3 0
2 years ago
In ipv6, what field is used to indicate what sequence of packets from one source to one or multiple destinations a packet belong
deff fn [24]

Answer:

Flow label

Explanation:

A Flow label in IPv6 is a value given to a sequential flow of packets. To better understand what a flow label is, we need to know what a flow is first. A flow is a series of packets sent from a combination of a source address to a destination address. The routers configured to deal with IPv6 addresses handle these flows. Therefore, a flow label makes delivery of packets that belong to other similar sequential packets from source to destination or multiple destinations a priority.

5 0
3 years ago
Other questions:
  • Cell phone producers charge a _____, which consumers pay to buy the phones. profit production cost price
    12·1 answer
  • What is the synonym for term port?
    9·1 answer
  • What is the full word of"VPN"?​
    15·2 answers
  • If you had to choose, would you consider yourself more of an internet celebrant or a skeptic? On balance, do you think the inter
    10·1 answer
  • Match the different sources of payments to their descriptions. an electronic device that aids consumers to make online payments
    8·1 answer
  • Which two statements are true about the Data Sync functionality? (Choose two.)
    15·1 answer
  • A technician removes the cap from the brake fluid reservoir and finds that the rubber boot in the cap is swollen. technician a s
    8·1 answer
  • Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente
    9·1 answer
  • What is an example of an assumption and dependency that an automated stocking application project would include in an SRS?
    13·1 answer
  • Presentations must have what to be efffective
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!