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
AleksandrR [38]
3 years ago
9

Project: Math Tutor Program with Error Handling

Computers and Technology
2 answers:
galina1969 [7]3 years ago
5 0

Answer:

Woah

Explanation:

denpristay [2]3 years ago
3 0

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

You might be interested in
Business: check ISBN-13) ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13.
alexandr1967 [171]

Answer:

Following are the code to this question:

#include <iostream>//defining header file

#include <string.h>//defining header file

using namespace std;//using package

char checksum(const char *x)//defining a method checksum  

{

int s=0,m,d;//defining integer variables

for (m= 1;*x;++x)//defining for loop for caLculate value

{

d=*x-'0';//use integer variable to remove last digit from input value  

s=s+m*d;//add value in s variable

m=4-m;//use m to remove 4 from m

}

return '0'+(1000-s)%10;//use return keyword to get value  

}

int main()//defining main method

{

char ISBNNum[14];// defining character array  

cout<<"Enter the first 12 digits of an ISBN-13 as a string:";//print message

cin>>ISBNNum;//input value from user end

if(strlen(ISBNNum)==12)//defining if block to check length

{

char a=checksum(ISBNNum);//defining char variable a to call method checksum

ISBNNum[12]=a;//use array to hold method value

ISBNNum[13]='\0';// use array to hold 13 character value

cout<<"The ISBN-13 number is "<<ISBNNum;//print number

}

else//defining else block

{

cout<<ISBNNum<<" is an invalid input"<<endl;//print message

}

return 0;

}

output:

please find the attachment.

Explanation:

In the given code a character method "checksum" is define that accepts a character as a parameter and inside the method, three integer variable "s,m, and d" is defined that uses the for loop to calculate the input value and use the return keyword for the return value.  Inside the main method, a char array "ISBNNum", is defined that input the value from the user-end and define the conditional statement.

  • In the if block, it uses "ISBNNum" char array that checks its length equal to 12, if this condition is true it defines char a to call the method and hold its value and use the array to sore value in a and its 13 lengths it stores "\0", and print its value.
  • If the condition is false, it will print input array value and print invalid input as a message.

8 0
4 years ago
List 2 positive impacts of cybersecurity.
kupik [55]

Answer:

Protection for your business and Increased productivity

Explanation:

This is because it ensures your employees aren't at risk from potential threats and, since there no virus, the computers will work well (not slow down)

7 0
3 years ago
Read 2 more answers
What objective behaves like a high level array
zavuch27 [327]

Answer:

C.Vector

Explanation:

Vector is a high level array used in C++.It has the capability of resizing itself when it gets full.it has many functions that increases it's functionality like size(),begin(),end(),erase(),clear(),push_back(),pop_back() and many more and we store any kind of data type in the vector.

syntax for declaring a vector:-

vector<data type> vector name.

8 0
3 years ago
Why hackers hack?? in other people?​
pshichka [43]
Could you please reword this question. i don’t get what you’re asking
8 0
3 years ago
Read 2 more answers
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i
Amanda [17]

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

   //Prompt and receive user input

       System.out.println("Enter number of Steps");

       int numSteps = in.nextInt();

       double numMiles = numSteps/2000;

       //Print the formated number of miles

       System.out.printf("The equivalent miles is %.2f ",numMiles);

   }

}

Explanation:

  • This is solved using Java programming language
  • Scanner class is imported and used to receive user input (number of steps walked)
  • To convert number of steps to number of miles, we divide by 2000, Since the question says the pedometer treats walking 2,000 steps as walking 1 mile.
  • Output the number of miles to 2 decimal places using java's printf() method
6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following statements is true?a. Old paper documents, which were previously only available offline, are increasingly
    10·1 answer
  • A tripod head can move vertically or horizontally. What term describes these movements?
    15·2 answers
  • Big data refers to huge collections of data that are difficult to process, analyze, and manage using conventional data tools. It
    13·1 answer
  • In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other end, servicing requests till the
    11·1 answer
  • Which of these consoles had a 64-bit architecture
    10·1 answer
  • A External hackers have some access to a company's website and made some changes. Customers have submitted multiple complaints v
    11·1 answer
  • FREE BRAINLIEST!!!!
    7·2 answers
  • For a single CPU core system equipped wiith addditional hardware modes (besides user and kernel), choose those items that are ex
    7·1 answer
  • Describe the big data life cycle. Which step do you think is most useful and why?
    14·1 answer
  • What are the different types of topology?​ in details
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!