PLEASE HELP WITH THIS "PROJECT"
Your users are young children learning their arithmetic facts. The program will give them a choice of practicing adding or multiplying.

You will use two lists of numbers.

numA = [4, 1, 6, 10, 2, 3, 7, 9, 11, 12, 5, 8]

numB = [2, 12, 10, 11, 1, 3, 7, 9, 4, 8, 5, 6]

If the user chooses adding, you will ask them to add the first number from each list. Tell them if they are right or wrong. If they are wrong, tell them the correct answer.
Then ask them to add the second number in each list and so on.

If the user chooses multiplying, then do similar steps but with multiplying.

Whichever operation the user chooses, they will answer 12 questions.

Write your program and test it on a sibling, friend, or fellow student.

Errors : Think about the types of errors a user can make. Add at least one kind of error handling to your program.

Answers

Answer 1

numA = [4, 1, 6, 10, 2, 3, 7, 9, 11, 12, 5, 8]

numB = [2, 12, 10, 11, 1, 3, 7, 9, 4, 8, 5, 6]

operation = input("Are you adding or multiplying? (a/m)")

i = 0

if operation == "a":

   while i < len(numA):

       try:

           answer = int(input("{} + {} = ".format(numA[i], numB[i])))

           if answer == numA[i] + numB[i]:

               print("You're correct!")

           else:

               print("You're wrong! The correct answer is {}".format(numA[i] + numB[i]))

           i+=1

       except ValueError:

           print("Please enter a number!")

if operation == "m":

   while i < len(numB):

       try:

           answer = int(input("{} * {} = ".format(numA[i], numB[i])))

           if answer == numA[i]*numB[i]:

               print("You're correct!")

           else:

               print("You're wrong! The correct answer is {}".format(numA[i]*numB[i]))

           i+=1

       except ValueError:

           print("Please enter a number!")

The type of error handling we perform is ValueError handling. Instead of getting an exception when the user enters a letter when they try to answer a math problem, we tell the user to enter a number.

I hope this helps!


Related Questions

Which search phrase is the most effective to find out about the most popular pizza chains worldwide in 2019?
A.
popular pizza chains in the world
B.
most popular AND pizza chains AND worldwide AND 2019
C.
the most popular pizzas “in the world today” AND 2019 AND chains
D.
2019 worldwide pizza chains “most popular in the world”

Answers

D I believe is correct

Answer:

D

Explanation:

any song recommendations, pls dont say 6ix9ine or lil pump

Answers

I actually do have one tho. Try Megan Tha Stallion.

Answer:

smash mouth "all star" is my fave or Imagine Dragons "Whatever it Takes"

Explanation:

MULTIPLE COICE! BRAINLIEST
When using design templates, these elements will be determined for you.
bullets
background
color scheme
content
title
font

Answers

Answer:

background

Explanation:

Question # 6
Math Formula
What is the output of this program? Assume the user enters 2, 5, 1, and 6.

numA = 0
for count in range(4):
answer = input ("Enter a number: ")
fltAnswer = float(answer)
numA = numA + fltAnswer
print (numA)

Answers

Answer:

14.0

Explanation:

The loop converts each answer to a float. The accumulator variable adds the values entered.  

2.0 + 5.0 + 1.0 + 6.0 = 14.0

Answer:

14.0

Explanation:

Edge 2021

What are some options available in the Spelling and Grammar Checker? Check all that apply.

Redo
Undo
Ignore All
Ignore Once
AutoFormat
Add to Dictionary
Readability statistics

Answers

Add to Dictionary
kase ayun yung sa tingin kong tamang sagot soo yun na nga

Answer:

ignore all

ignore once

add to dictionary

Explanation:

took the assignment on edge2020

The background color indicates the background image of the web page.

True or false?

Answers

This is false. The background color refers to a solid color while the background image just an image.

The background color indicates the background image of the web page is false.

What is distinction among history and history photo?

In a history asset, you could upload history-color, repeat , no-repeat and different photo attributes, however withinside the history-photo assets you're most effectively allowed to feature photos. Show hobby in this post. By the usage of history, you want to specify a different arguments to set the history of the page.

The Background Color facts is saved for photo and image documents that have a color distinctive to the photo history. The history colour is, in maximum cases, displayed withinside the shape of an RGB triplet or a hexadecimal code.

Read more about the web page:

https://brainly.com/question/3700565

#SPJ2

Explain in details how Galen , a physician during the Middle Ages, expanded on Hippocrates' theory of the four humors and explain what he believed each other humor represented ?

Answers

Answer:

Galen expanded on the Hippocrates' theory of humor by assigning personalities, moods, behaviors, and emotions to the four humors. He believed blood stood for sanguine personality, black bile for a melancholic personality, yellow bile for a choleric personality and phlegm for a phlegmatic personality.

Explanation:

Hippocrates put forward the theory of the four humors. According to the theory, the human body is made up of four substances: black bile, yellow bile, blood, and phlegm. A healthy human body is the product of a balance of among the four humors, while diseases results if there is an imbalance among the four humors.

Galen, a keen admirer of Hippocrates' ideas, further elaborated on this theory and believed that they affected personalities, moods, behaviors, and emotions.

The personalities assigned the four humors are as follows:

People with predominantly black bile are Melancholic (corresponding to the season of autumn dry and cold): They are very sensitive, and enjoy artistic pursuits.

People with predominantly yellow bile are Choleric (corresponding to the season of summer, dry and hot): They possess a passionate temperament, They have a lot of ambition, energy, drive, enormous vitality but are domineering and get angry quickly.

People with predominantly blood are Sanguine (corresponding to the season of spring, wet and hot): These people are confident, joyful, optimistic, expressive, confident, rational and sociable.

People with predominantly phlegm are Phlegmatic (corresponding to the season of winter, wet and cold): They are deep thinkers, fair, calm, very consistent, relaxed, and observant, willing to compromise, and hard workers.

HELP ASAP!!!
Write a program that asks the p34won to enter their grade, and then prints GRADE is a fun grade. Your program should repeat these steps until the user inputs I graduated.

Sample Run
What grade are you in?: (I graduated) 1st
1st is a fun grade.
What grade are you in?: (I graduated) 3rd
3rd is a fun grade.
What grade are you in?: (I graduated) 12th
12th is a fun grade.
What grade are you in?: (I graduated) I graduated

It's in python

Answers

def func():

   while True:

       grade = input("What grade are you in?: (I graduated) ")

       if grade == "I graduated":

           return

       print("{} is a fun grade".format(grade))

func()

I hope this helps!

What can you do to prevent damage to a computer? Check all of the boxes that apply.

Keep your computer in a temperature- controlled room.

Tie cords in knots so they are shorter.

Dust your computer only when you see a buildup of dust.

Use surge protectors when you are away from home or school.​

Answers

Answer:

temperature-controlled room and surge protectors

Explanation:

Answer:

Keep your computer in a temperature- controlled room

Dust your computer only when you see a buildup of dust

Use surge protectors when you are away from home or school

Explanation:

just good

What does a coder do on a daily basis?

Answers

medical charts and assinging codes

girls question
who wants to go out ;p

Answers

MEEEEE PICK ME CHOOSE ME IM LONELY

Answer: I do

Explanation: *P.S.* I'm a Boy

How can I get coding with no experience?

Answers

With "no" experience? With help, yes! Although with nothing, it would be almost impossible.

what is a cloud in the world of computing

Answers

Answer:

In the simplest terms, cloud computing means storing and accessing data and programs over the internet instead of your computer's hard drive

Explanation:

Which is the fastest way to make many formatting changes to a range of cells?
select each cell, right-click, use the ribbon to make changes
select the range, right-click, use the ribbon to make changes
select the range, right-click, format cells, make changes
select each cell, right-click, format cells, make changes

Answers

Answer:

c 3

Explanation:

c 3

Answer:

I believe it could be C

Explanation:

Please click "Thanks" if this helped in any way! :)

What piece of equipment changes the signal from the television camera into an electronic signal?
receiver
transducer
transponder

Answers

Answer:

Transponder

Explanation:

Transponder - a device for receiving a radio signal and automatically transmitting a different signal.

Answer:

transponder isnt correct i took the quiz its one of the other 2

Explanation:

the correct answer is transducer

Select the correct answer.
What is a hyperlink?
A.
A bold link that goes back to a newspaper
B.
A link that clicks on itself
C.
A way to cite sources in an online article
D.
A special link on a smartphone

Answers

Answer:

c.

Explanation:

a link from a hypertext file or document to another location or file, typically activated by clicking on a highlighted word or image on the screen.

Answer:

c

Explanation:

came out my study guide and i made a 96 % on my 50 question test

Which of the following is NOT a correct variable assignment?
O test = 98
Oname = "Ada"
O x = x + 1
O 5+ y = x

Answers

So the bottom ones such as x = x + 1 and 5 + y = x are incorrect because there not being initialized with any value. You can’t make a variable and say x = x + 1 without defining what x is.

Variables are simply the names given to memory location.

The incorrect variable assignment is (d) 5 + y = x

To assign a value to a variable, we make use of the following syntax:

variable = expression/value

The above syntax means that:

The variable will be on the left-hand side, while the values or the expressions will be on the right-hand side

Using the above highlights as a guide, we can conclude that:

(d) 5 + y = x is not a correct variable assignment

This is so because, it does not conform to the syntax of variable assignment

Read more about variable assignments at:

https://brainly.com/question/18522561

Which of these is a rule for creating variable names?

Must start with a capital letter

Must start with a lowercase letter

Cannot include numbers

Cannot use an underscore to separate words

Answers

Answer:

Must start with a lower case letters

Please Help!

Choose all items that are characteristics of placing nested elements on a new line, using indentation.


A) makes HTML errors difficult to find

B) not required by a web browser

C) can cause web page display errors

D) makes HTML analysis and repair easier

E) done automatically by HTML authoring software

Answers

Answer:

Its B,D,E

Explanation:

Got it right on e2020

Answer:

B). not required by a web browser

D). makes HTML analysis and repair easier

E). done automatically by HTML authoring software

Btw cause this class can be a pain here are the answers to the rest of the assignment.

Slide 7/12:

The missing element is

C). <p></p>

Slide 9/12:

The missing tag is:

B). an end (closing) a tag

Slide 12/12:

The missing character is

D). an angle bracket

Explanation:

I just did the Part 3 on EDGE2022 and it's 200% correct!

Also, heart and rate if you found this answer helpful!! :) (P.S It makes me feel good to know I helped someone today!!)

How did New York Governor Hugh Carey handle Sostre’s situation?

Answers

Answer:

The governor found a way to free Sostre without assessing whether or not he was guilty or innocent of drug crime in buffalo.

Explanation:

Answer:

The governor found a way to free Sostre without assessing whether or not he was guilty or innocent of drug crime in buffalo.

Explanation:

correct on e2020 Dawg

Why can the internet keep growing as more devices are added without decrease in performance?

Answers

Answer:

Explanation:

There may be many reasons why your internet speed is slow. Internet use requires a reliable connection between your device and the destination, which may be a server that is physically located on the other side of the world.Your connection to that server could pass through hundreds of devices on its journey. Each one of these is a potential failure, or weak point. If one point along this path isn’t functioning optimally, this can significantly affect your internet experience.

There are many reasons your Internet connection might appear slow. It could be a problem with your modem or router, Wi-Fi signal, signal strength on your cable line, devices on your network saturating your bandwidth, or even a slow DNS server. These troubleshooting steps will help you pin down the cause.

Part B
How would you classify a network formed by connecting two MANs together?
В І у хх Font Sizes А • А

Answers

Computer programming 2254518752669

Which function will find the difference of 15 and 3 and return 12 when the main part of your program has the following line of code?

answer = subtract(15,3)

def Subtract(numA, numB):
return numA - numB

def Subtract(numA, numB):
return numB - numA

def subtract(numA, numB):
return numA - numB

def subtract(numA, numB):
return numB - numA

Answers

Answer:def subtract(numA, numB):

   return numA - numB

Explanation:

i got the right answer but i was willing to get it wrong for the right anwser for you

The function that will find an accurate difference of 15 and 3 and return 12 when the main part of your program has the following line of code is as follows:

def subtract(numA, numB):

       return numA - numB

Thus, the correct option for this question is C.

What is the significance of the output of the program?

The significance of the output of the program is understood by the fact that it delivers some values or concepts to the user with respect to the instruction he/she is given to the computer for processing. The output of the program is very specific in nature.

According to the question, you have to assume the value of number A as 15 and number B as 3. So, when you find the difference between these numbers, you get an output of 12.

You must follow the process as follows while framing a program:

def subtract(numA, numB):

         return numA - numB

Therefore, the correct option for this question is C.

To learn more about Output of a program, refer to the link:

https://brainly.com/question/18079696

#SPJ2

how do you give brianliest

Answers

Answer:

When you ask a question in brainly, two helpers will answer it, then on each answerer you'll find "mark as brainliest" button which looks like a crown.

Hope this helps :)

Which item cannot be inserted into a header or footer of a document?

Answers

Answer:

All the above items can be inserted into either a header or a footer.

Please mark brainliest!

The items that cannot be inserted into a header or footer of a document is all the above items can be inserted into either a header or a footer. The correct option is d.

What is a header or footer?

A document is a type of information that can be stored electronically. Page numbers are generated automatically. Tables with columns and rows, pictures, shapes, and clipart can all be inserted into a document's header or footer. As a result, all of the items listed above can be inserted into the header or footer.

A header is text at the top of a page, whereas a footer is text at the bottom, or foot, of a page. Typically, these spaces are used to input document information such as the document's name, chapter heading, page numbers, creation date, and so on.

Therefore, the correct option is d, All the above items can be inserted into either a header or a footer.

To learn more about the header or footer, refer to the link:

https://brainly.com/question/4637255

#SPJ2

The question is incomplete. Your most probably complete question is given below:

Automatic page numbers

Tables with columns and rows

Pictures, shapes, and clipart.

All the above items can be inserted into either a header or a footer.

A peripheral can be used to tell a computer to complete a specific task.
A) True
B)False

Answers

Answer:

A. true

Explanation:

because you can complete it without it mistakes if your using an computer but if you use an paper you will make mistakes over and over

most 4 year colleges want an applicant's scores for all the following except

Answers

Answer:

IQ

Explanation:

Hi guys, Im making a game. I want to make a collision event, but what is the code for making the wall and the box collide. I really need a quick and correct response. Pls support.

Answers

Answer:

i think its 3337

Explanation:

Before he buys a new smartphone, Tim can best use data to

evaluate which phone he should get.
convince himself he wants a phone.
discredit others’ opinions on his phone choice.
recognize problems that all phones have.

Answers

It’s A or the first one, kinda like process of elimination, the second and third one are obviously eliminated first so then it’s just between a and d. But a makes more sense as to he has to buy one either way

Answer:

A.) Evaluate which phone he should get

Explanation:

Edge2020

Which best describes what happens when a formula is copied from one cell to another?
The cell references in the formula remain the same to match the cell that the formula is pasted into.
The cell references in the formula remain the same as they were in the original cell.
The cell references in the formula change to match the cell that the formula was copied from.
O The cell references in the formula change to match the cell that the formula is pasted into.
Hurry up

Answers

Answer:

b 2

Explanation:

b2

Other Questions
explain any four qualities of good society in brief benefits are offered by employers to attract good employees what do you mean by 1 watt How did the non-Aztec people living in the Valley of Mexico feel when the Aztecs arrived?15 points for answers!!!!! please answer immedietly... What does it mean for a source to be reliable?(1 point)It is published on the internet.It is trustworthy.It took a long time to write. It cites at least one source.When researching the topic of "performance enhancement equipment in competitive sports," which source is most likely to be trustworthy?(1 point)a survey of fifteen physical education teachersthe opinions of five baseball coaches a survey of eight professional athletic organizations the opinions of ten basketball playersVivian is researching the topic of listening to music while studying. Vivian finds that Text 1 is more trustworthy than Text 2. Which piece of information is likely to be found in Text 2?(1 point)the results of a study published in a scientific journal about the effects of music on concentrationthe results of a survey of 1,000 college students about their grades and study habitsa story about a teenager who improved his grades by listening to classical music while he studiedan interview with a doctor who specializes in memory and works with teenagersWhat is a sign that the source you are reading might be unreliable?(1 point)It is trying to sell a product. It includes facts verified by outside sources.It uses neutral language.It is created by a professional journalist. Which statements are supported by this newspaperheadline? Check all that apply.O Serbia declared war on Austria.VIA,DOPS;ANDSRussia had mobilized its forces.O Germany was the only nation that could stop theconflictThe United States would likely be drawn into war.O Many nations were threatened by the comingconflict. 'the cover my new book ai as soft as velvet'metaphor or simile?what 2 things are compared? HELP FAST IT'S TIMED The ratio of brown tiles to white tiles in Mrs.Harris kitchen in 4 to 5. There are 180 white tiles in the kitchen. What is the total number of tiles in mrs. Harris kitchen What is being personified in this sentence?"The bright orange walls screamed at her as she walked into the room." plz helpppppppp me thxs The toy rocket is how much inches long? what make purple ANSWERred an blue Prepare the general journal entry (without explanation) needed to close Net Income or Net Loss for the year end. Use compound entries where required. If no entry is required then write "No Entry Required." Where were the children throwing pebbles? A relationship between two events where the first event is responsible for the second event.A: Bias and effectB: hypothesis and questionsC: Cause and effectD:bias and error I WILL GIVE BRAINLIEST! ONLY 5 MINS FIRST TO ANSWER GETS BRAINIEST!A Mexican family is on holiday in San Francisco. At a caf they order 2 hot dogs and 2 chicken salad. The exchange rate is $1 = 21.22 Mexican Pesos Work out their total bill in Mexican Pesos All of the following statements regarding fossils are true EXCEPT:a. A trace fossil is a fossil created from theremnants of a dead organism.b. Amber-preserved fossils are the mostcommon form of fossils and are actually theleast helpful in studying organisms.c. A mold fossil is an imprint of the organism onthe rock.d. Petrification is the result of a dead organismhardening and turning to stone or rock, asseen in petrified trees. How does the internet amplify our existing attitudes? Solve the equation 4x + 16x - 5 = 0 by completing the square .