Project: Math Tutor Program with Error Handling
image of a man sitting on a branch he is about to cut off

Sawing off the branch you are sitting on can only end badly (Imagery supplied by photoschmidt/iStock via Getty)
Unlike the man in the picture, you already know how to plan for and handle errors before they happen. You know how to create and use lists. You know how to use loops. You are going to put these abilities to work in this project. You are going to write a program to help young children with their arithmetic skills.

Objectives
Plan and create a program to practice math facts with error handling.

Your Goal
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.

What to Submit
Save your program with a .txt extension. You cannot upload a .py file.
Before you turn your project in, read the rubric.

I need this to be original work

Answers

Answer 1

Answer:

finished = False

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]

while True:

 pick = input("Would you like to practice addition (+) or multiplication (*)?")  

 

 if pick == "+":

   for o, k in zip(numA, numB):

     ans = input(f"What is {o} + {k}?")

     

     if ans == str(o + k):

       print('Correct!\n')

     else:

       print(f"Incorrect! The correct answer was {o + k}\n")

   finished = True

 

 elif pick == "*":

   for o, k in zip(numA, numB):

     ans = input(f"What is {o} * {k}?")

     

     if ans == str(o * k):

       print('Correct!\n')

     else:

       print(f"Incorrect! The correct answer was {o * k}\n")

   finished = True

 

 else:

   print('Incorrect Input!')

 

 if finished:

   print('Thanks for playing!')

   break

Explanation:

aduhhhh


Related Questions

Which is an example of correct HTML?

This is a heading
This is a heading
This is a title
This is a title
Question 3(Multiple Choice Worth 5 points)

Answers

Answer:

An HTML tag is a special word or letter surrounded by angle brackets, &lt​; and >. You use tags to create HTML elements , such as ...

Explanation:

Which statement allows more than one condition in an If statement? O Else O While O Elif If-then ​

Answers

Answer:

C. Elif

Explanation:

:)

Answer:

Eilf 100000%

Explanation:

PLS HURRRYYYYYY!1!1!1!1!1
You have used different ways to store data. Match each definition with its type.

movieAwards = ('Oscar', 'Golden Globe', 'Director's Guild')

movie = 'Star Wars'

movieStars = ['Carrie Fisher', 'Harrison Ford']

movieRatings = {5:'language', 3:'violence'}

movieID = 132

movieCost = 4.95


Vocab:

Float

Tuple

int

string

list

dictionary

Answers

movieID = 132 Int

movieCost = 4.95 Float

movie ='Star Wars' string

movieAwards = ('Oscar', 'Golden Globe', 'Director's Guild') tuple

movieStars = ['Carrie Fisher', 'Harrison Ford'] list

movieRatings = {5:'language', 3:'violence'} dictionary

If you want these explained , can do in replies :)

Answer: Int, Float, String, tuple, list, dictionary

Explanation: got it right on edgen

What is the next line? >>> myTuple = [10, 20, 50, 20, 20, 60] >>> myTuple.index(50) 1 2 4 3

Answers

Answer:

2

Explanation:

got right on edg.

Answer:

2

Explanation:

i got it wrong for the right answer

Suraj is installing Microsoft Windows on his home computer. On which device will the installer copy the system files? A.  read-only memory B.  hard disk C.  random access memory D.  control unit E.  arithmetic logic unit​

Answers

The device that will the installer copy the system files are:

Random access memory.Control unit.

What are the Windows system files?

A Windows system file is known to be a file that is said to have a hidden system attribute  that is said to have been put on.

Conclusively, Note that  system files are files that are said to depends on the Windows so that they can work and as such the use of Random access memory and Control unit are the two device that can help Suraj in his work.

Learn more about  system files from

https://brainly.com/question/1226264

PYTON CODERS I NEED HELP I WILL GIVE BRAINLIEST!!! Why is this python code giving me problems?
This is having the user input a decimal number and the code has to round it up to the 2nd decimal place. This code is giving me problems, please fix it.

num3 = int(input("Please input a decimal number:")

num3 = int(round(num3, 2))

print ("your decimal rounded to the 2nd decimal place is:", x)

Answers

Answer:

num3 = float(input('Insert a decimal: '))

num3 = round(num, 2)

print(f"You rounded decimal is: {num3}")

Explanation on why this works:

This block of code resembles a decimal from user input and round it to its nearest 10th. Let me explain the flaws in the original:

>>> num3 = int(input("Please input a decimal number:")

On this line of code you put it as the user input will be transferred to an int when in reality it should be a decimal float so we can round it later in the program. so it should be:

>>> num3 = float(input("Insert a decimal: "))

Second Line of code:

>>> num3 = int(round(num3, 2))

In this case, the int() function is not needed. so just remove and its good.

Lastly you used:

>>> print("your rounded decimal is: ", x)

Which is perfectly fine. Two more ways to output the same thing is by using:

>>> print(f"You rounded decimal is: {num3}")

Or just use the format() string method:

>> print("You rounded decimal is: {0}", num3)

heeeeeeeeeelp its timed :(
drag the correct word to the correct place
plllz help

Answers

Answer:

Upward Blue arrow= Lift

Downward Blue arrow= Drag

Upward yellow arrow= Thrust

Downward yellow arrow= Weight

i m not so sure

What are the characteristics of using the Email Calendar command? Check all that apply.

a. it shows a specific date range
b. it shares a snapshot of the calendar
c. it is delivered as an attachment to an email
d. it grants read only access to the whole calendar
e. it is used to show dates without sharing the entire calendar.
f. it allows the user to add the calendar to their outlook client.


(question from edge)

Answers

Answer:

a b c e     are the correct ones

Explanation:

A, B, C, E

the correct answers are A, B, C, and E

Which of the following will result in a True value?
1. NOT (TRUE AND FALSE) AND TRUE
II. NOT (TRUE AND TRUE) AND TRUE
111. NOT (TRUE AND TRUE) OR TRUE

Answers

Answer:

1. 'NOT(TRUE AND FALSE) AND TRUE'

3. 'NOT (TRUE AND TRUE) OR TRUE'

Explanation:

We can go through each option to find out which statements will result in a 'TRUE' value.

1. 'NOT (TRUE AND FALSE) AND TRUE':

'TRUE AND FALSE' inside the parentheses will result in 'FALSE' since the Boolean operator 'AND' requires both terms to be 'TRUE' for the resulting value to become 'TRUE', otherwise it returns 'FALSE'.

'NOT (TRUE AND FALSE) AND TRUE' now becomes 'NOT FALSE AND TRUE'. The Boolean operator 'NOT' will return the opposite of the term given, so 'NOT FALSE' becomes 'TRUE'. This leaves us with 'TRUE AND TRUE' which returns 'TRUE'.

2. 'NOT (TRUE AND TRUE) AND TRUE':

'TRUE AND TRUE' inside the parentheses will result in 'TRUE', leaving us with 'NOT TRUE AND TRUE'. 'NOT TRUE' will give us 'FALSE', resulting in 'FALSE AND TRUE'. The resulting value of 'FALSE AND TRUE' is 'FALSE'.

3. 'NOT (TRUE AND TRUE) OR TRUE':

Again, 'TRUE AND TRUE' inside the parentheses will result in 'TRUE', leaving us with NOT TRUE OR TRUE'. The Boolean operator 'OR' requires only one term to be 'TRUE' for the resulting value to become 'TRUE'. This means that this statement will return 'TRUE'.

Hope this helps :)

Un electrodoméstico presenta un rendimiento del 70% y absorbe de la red eléctrica una energía de 2,3 kWh durante 45 minutos. Calcula La potencia que tiene el electrodoméstico

Answers

Answer:

1.6KWh

Explanation:

La fórmula de la eficiencia del consumo energético es,

eficiencia = (salida / entrada) x 100

La eficiencia del aparato es = 70%

potencia en = 2,3 KWh

potencia de salida = vatios x (45 minutos / 60) veces en horas.

70 = (vatios(45/60) / 2,3 x 10 ^ 3) 100

0.7 = vatios(45/60) / 2,3 x 10 ^ 3     //dividir ambos lados por 100

1610 = vatios(0.75)                           //multiplica ambos lados por 2300

potencia de salida = vatios (0,75) = 1610/1000 = 1,6KWh

here is something cool

Answers

cool beans s s s s s s s s

Answer:

Ok

Explanation:

What does a pencil icon in the row selector area indicate?

The record is missing some text or data values in its fields.
The row is blank and is available for inserting a new record.
The row is being edited, and the changes are not yet saved.
The record has incorrect data values or conflicting data values.

(This is using Excel)

Answers

Answer:

c

Explanation:

The pencil icon is in the row selector area it indicates that the row is being edited, and the changes are not yet saved.

What are fields in computer?

We all have to use the computer to fill in forms and these forms have spaces for us to provide information. These spaces that we are required to fill are called fields.

When the pencil icon is in the row selector area it indicates that the row is being edited, and the changes are not yet saved.

Learn more about computer:https://brainly.com/question/21080395

#SPJ2

How does just listening improve your understanding of a poem?​

Answers

Answer

The more you listen to the poem the more words you may hear. Then you ay be able to brea it down, to understand it yourself.

Explanation:

Is it still worth it to get Airpods right now?

Answers

Answer:

Well that depends if you're getting them for Christmas.

Explanation:

Also I have Airpods, and in my point of view There kinda hard to keep track of, but maybe that's just me :P

I hope I helped!

can some one please help

Answers

Answer:

i will try other questions too

What's the maximum number of ad extensions that can show for a particular query or device at any given time?

Answers

Answer:

Four (4) extensions.

Explanation:

Go-ogle Ads can be defined as a strategic advertising platform designed and developed by Go-ogle for use over the internet. It can be used to display product listings, services and campaigns to any web user over the internet.

Basically, for those who are relatively new to the Go-ogle Ads, the company provides a feature known as the dynamic search ads which helps various users to easily run a successful ad campaign. Through the use of machine learning, a dynamic search ad allows phrases and titles associated with a website to be automatically indexed and presented as a landing page to any user who is searching with the keywords.

The maximum number of ad extensions that can show for a particular query or device at any given time is four (4) extensions. The Go-ogle Ad extension platform is designed to display all the ads simultaneously or co-trigger and as such, the maximum number of ad extensions that are displayed per query or device are four (4).

Which computer program offers a comprehensive collection of tools for creating digital art by using a variety of
shapes, lines, and letters which can be easily measured and formatted?
O LibreOffice Draw
O Microsoft Excel
O LibreOffice Calc
O Microsoft PowerPoint

Answers

Answer:

the anwer is probaly B

Explanation:

Answer:

A- LibreOffice Draw

Explanation:

A twitch streamer has Disney music playing in the background through Spotify while they play Fortnite. The video is taken down the next day. Why is the video taken down.


Please help, Thank you! :)

Answers

This is due to copyright
Explanation: certain music is copyrighted . Which means you can’t use it without permission from them

Please help me!!!

Use searching laterally to find more out about obesitymyths.com and if it is credible. Share your findings here.

Answers

Explanation:

I am verry bad at computer science. ...........

Using the search tool, it is discovered that the website is not a credible website.

Why is the website not credible?

This is due to the fact that the domain of the website has been put up for sale. The website does not contain information about what its name suggests.

There is a transfer of ownership waiting to happen. Hence we can conclude that it is not a credible website.

Read more on websites here: https://brainly.com/question/1382377

#SPJ2

At the end of a presentation it is important to:

Answers

Answer: We just no man, Don't ask us, just watch and learn.

Explanation: These are just facts, and you know it.

Which phrase best describes a scenario in Excel 2016?


A. a type of what-if analysis that allows a user to define a single variable for a single function or formula

B. a type of what-if analysis that allows a user to define multiple variables for multiple functions or formulas

C. a type of chart analysis that allows a user to predict outcomes using data

D. a type of chart analysis that allows a user to set predetermined outcomes using data

Answers

A phrase which best describes a scenario in Microsoft Excel 2016 is: B. a type of what-if analysis that allows a user to define multiple variables for multiple functions or formulas.

What is Microsoft Excel?

Microsoft Excel simply refers to a software application that is designed and developed by Microsoft Inc., for analyzing and displaying spreadsheet documents, especially by using rows and columns in a tabulated format.

The types of function in Microsoft Excel.

In Microsoft Excel, there are different types of functions which are referred to as "predefined formulas" and these include the following:

Sum functionMaximum functionAverage functionCount functionIF functionMinimum function

In conclusion, Microsoft Excel 2016 is designed and developed by Microsoft Inc., as a type of what-if analysis which avail its end users to use multiple variables in defining multiple functions or formulas.

Read more on Excel function here: https://brainly.com/question/14371857

#SPJ1

the ratio of length, breadth and height of a room is 4:3:1. If 12m^3 air is contained in a room, find the length , breadth and height of the room​

Answers

Explanation:

The ratio of length, breadth and height of a room is 4:3:1

Let length = 4x

Breadth = 3x

Height = x

Volume of air contained in the room, V = 12 m³

We need to find the length, breadth and height of the room. The room is in the shape of a cubiod. The volume of a cuboid is given by :

V = lbh

[tex]4x\times 3x\times x=12\\\\12x^3=12\\\\x=1[/tex]

Height of the room = 1 m

Breadth of the room = 3x = 3 m

Length of the room = 4x = 4 m

How can data consolidation be helpful? Check all that apply
•It can set up automatic updating of data within one worksheet.
•it can summarize data from worksheets in different workbooks.
•it helps to summarize data from worksheets that are not identical.
•it combines data from multiple sheets to create one concise table.
• it summarizes data based on how many rows and columns have values.

Answers

Answer:2,3, and 4

Explanation:

Answer:

2,3,4

Explanation:

oof x oof = ? idk what that is

Answers

Answer:

= 1 off!

Explanation:

1x1

Answer:

Double OOF!!!!!!!!

Explanation:

I dont have one....

Match the database function to its purpose
finds the largest number in a database that
matches conditions
DCOUNT
DMIN
adds the numbers in a field of records in a
database that matches conditions
finds the smallest number in a database that
matches conditions
DAVERAGE
counts the cells that contain numbers in a
database that matches conditions
DMAX
DSUM
averages values in a field of records in a
database that matches conditions
Icy ll

Answers

Answer:

DCOUNT

counts the cells that contain numbers in a database that matches conditions

DMAX

finds the largest number in a database that matches conditions

DMIN

finds the smallest number in a database that matches conditions

DSUM

adds the numbers in a field of records in a database that matches conditions

DAVERAGE

averages values in a field of records in a database that matches conditions

Explanation: I got it right

What are two things that happen when a home computer scanner uses electromagnetic waves?
A.Red light shines on patterns of black and white, recording the pattern of reflected light
B. A charge-coupled device captures visible light that is reflected off an object.
C. A silicon chip releases electrons by the photoelectric effect, producing an image.
D. Objects are exposed to X-rays, which either pass through or are absorbed by the objects.

Answers

Answer:b

Explanation:

A charge-coupled device captures visible light that is reflected off an object are two things that happen when a home computer scanner uses electromagnetic waves. Hence, option B is correct.

What are electromagnetic waves?

Electromagnetic waves can be used to carry communications signals by changing the wave's amplitude frequency, or phase. The signal is transformed into a series of binary ones and zeros that can be used to transfer audio and video across televisions and mobile devices.

Electromagnetic energy is a form of radiation that travels at the speed of light in waves. Other names for it include light, electromagnetic radiation, electromagnetic waves, radiant energy, or the movement of radiation. Heat can be transferred through electromagnetic field radiation.

Electromagnetic waves, or EM waves, are produced by the oscillations of an electric field and a magnetic field. In other words, electromagnetic waves are created when magnetic and electric fields oscillate.

Thus, option B is correct.

For more information about electromagnetic waves, click here:

https://brainly.com/question/3101711

#SPJ5

Which of the following is the fastest computer processing speed?
Group of answer choices

bytes

megahertz

megabytes

gigahertz

Answers

Answer: Gigahertz

Explanation: One megahertz is equal to one million cycles per second, while one gigahertz equals one billion cycles per second.

This means a 1.8 GHz processor has twice the clock speed of a 900 MHz processor.

Consider this query:
SELECT Email
FROM Teachers
WHERE License Expire Month = "February";

Can you explain what each part of it does? Why might someone perform this query, and what use could they make of the results?

Answers

Answer:

There is a table in the database named Teacher having columns Email, Expiry Month etc. this query is selecting the email address from the table Teachers on the basis of expiry month that is February.\  

Explanation:

Based on the given SQL query, the function which it will do is to:

Create a dB named "Teacher"Create columns

What is an SQL query?

This refers to the structured query language that is used in databases to create and handle databases.

Hence, we can see that the action of the query is that it would select an email address based on the expiry month, which is February by SORTing the data.

Read more about SQL here:

https://brainly.com/question/25694408

#SPJ2

The overall appearance of goods and services can be trademarked.
True
False

Answers

Answer:

true

Explanation:

Will you mark me the brainest plz I will follow you

The answer would be True

Gross profit i how much it costs to bring a business products to the costumers true or false

Answers

Answer:

True

Explanation:

Other Questions
Helen can type at a rate of 70 words per minute. How many words can she type in 45 minutes? Which supporting details (the underlined ones) from the passage would be most important to include in a summary????Will mark brainleist.Please Help?????????? lessils used 25% of half a gallon (64 ounces) of milk for a recipe how many ounces of milk where left A increasing trend is said to be of what kind of correlation Directions: Identify the word and part of speech that the underlined adverb modifies. 1. Laura and Maurice met regularly for dinner. 2. Frequently, Laura took Maurice on visits to her own family. 3. Maurice was most graciously welcomed by Lauras family. 4. The communion around the large table was eagerly shared with Maurice. 5. Maurice has become quite successful as an adult How is anne frank affected by conflict During metaphase, a step in the cell cycle, a cell What three occupational groups make up approximately 50% of the workforce of the United States g I see you took a course about managing ethics and corporate social responsibility. What did you learn in that class Which statement about viruses is true?Viruses do not have genetic material.Viruses need a host cell to multiply.Viruses are larger than bacterial cells.Viruses have a cell wall and cytoplasm. What is the value of x?X 64 what are the function of intermediaries in market Which is NOT a fossil fuel?gasolineoilsolar energy Three times a number, subtracted from 20, is equal to -7 Jihan's favorite baseball team is one game away from making it to the playoffs. Each regular season ticket costs $15 and each playoff ticket costs $40. If Jihan wanted to take two friends to the last regular season game and one friend to a playoff game, how much money would she need? Identify the authors purpose and point of view. Support with with details and evidence.From the story''Martin Luther King, Jr.'s Letter from a Birmingham Jail''PLSS help ASAP Can anyone help me with this Midterm Advanced Algebra problem (DONT ANSWER IF YOUR NOT SURE) There was 1.8 l of milk in a bottle. Peter drank 30% of the milk.How much milk did he drink? why is it important to vote and the importance of election?please give your own answer What is the effect of the first-person point of view in thisexcerpt?O Readers get direct advice about which foods toincorporate in their own diets.O Readers are personally drawn into the culture ofElizabethan England.O Readers receive a good representation of what wasconsidered healthy food in Elizabethan England.O Readers see the differences between themselvesand people of another time period.