Math Tutor Version 3
This
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
STARTING OUT WITH C++ MPL
Additional Engineering Textbook Solutions
Starting Out with Python (4th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
C How to Program (8th Edition)
Concepts of Programming Languages (11th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
- In Lab 2, you created a menu for a simple calculator program. In this lab, you will add some functionality to the menu. Also, it is important to let the user know if they entered an invalid choice. Write a program (or modify the one written for Lab 2) that displays the following menu and prompts the user for a selection. Once the selection has been made, display the selection back to the user. Then, ask the user for two numbers and perform the selected operation (+, -, *, /). Display the results back to the user (e.g. 2 + 3 = 5). When dividing, display an error message if the second number (denominator) is 0. 1) Add two numbers 2) Subtract two numbers 3) Multiply two numbers 4) Divide two numbers 9) Exit program The program should: contain header comments as shown in class display a "hello" message before presenting the menu display the menu prompt the user for selection display the selection back to the user if the selection was invalid, display error message to user and then go…arrow_forwardLap Timer Tool Write a Python (GUI program) that asks the user to enter the number of times that they have run around a racetrack, and then uses a loop to prompt them to enter the lap time for each of their laps. When the loop finishes, the program should display the time of their fastest lap, the time of their slowest lap, and their average lap time.arrow_forwardPerform Student Controlthat you have the menu where you first enter the names of the studentsenter the names of the coursesthat averages the courses per studentto display on the screen the entered students, the courses and their options, scores and whether or not they were promoted. And create a class called teacherarrow_forward
- * Question Completion Status: Moving to another question will save this response. Quèstion 5 Simplified form of F=y +x y+y xz is xy + y + x Z xy + y (1 + y z) xy +y (x+y z) xy +y +xz A Moving to another question will save this response.arrow_forward44% 2:34 PM Theme Park Ticket Application In holidays, people try to save their time and purchase entrance tickets of the favored theme parks online. This project aims to create a simple and most efficient application that will display a menu to the visitors which contains: 1. Book a ticket The program will display a menu that contains all the ticket prices below, get how many tickets he/she would like to buy, and displays the total price. The ticket Price Child - Under 8 years old 70 USD Adults 110 USD Seiners 50 USD 2. Calculate the price The program should calculate the total price of tickets and display it to the visitor. The program will ask if the visitor is a student, then a discount of 40% is applied to the total price. 3. Exit the application The application should be terminatedarrow_forwardCasel: Write a menu driven program that allows you to visit cities ofman in random order with following options.1: Visit a city2: Go to previous city3: Quit theprogramWhen user presses 1: program asks user to enter the city name, andthen display that the city has been visited. Please note user can visit acity any number of timesWhen user presses 2: Program takes you back to the previous cityWhen user presses 3: Program terminatesSee the below example how program interacts with the user:C:> 1: Visit a cityprogramEnter your choice2: Go to previous city3: Quit thePlease enter a city to visit.MuscatYou are in Muscat now.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.IbraYou are in Ibra noW.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.SoharYou are in Sohar now.Enter your choice.1: Visit a city2You are in Ibra now.2: Go to previous cityEnter your choice.1: Visit a city2: Go to previous cityPlease enter a city to…arrow_forward
- In a loop when a condition is false you come out of the loop. However, interesting things happen when the condition is true and you remain in the loop. What kinds of interesting things happen discuss with arguments.arrow_forwardLanguage c++arrow_forward# Constants for the menu choices# Constants for the menu choicesPURCHASE_ADULT = 1PURCHASE_CHILD = 2PURCHASE_MOUSE_EARS = 3PURCHASE_PARKING = 4PURCHASE_FOOD = 5PRINT_ALL = 6CALC_TOTAL = 7QUIT_CHOICE = 8# The main function.def main():# The choice variable controls the loop# and holds the user's menu choice. choice = 0 costAdult=0 costKid=0 costEars=0 costPark=0 costFood = 0 while choice != QUIT_CHOICE:# display the menu. display_menu()# Get the user's choice. choice = int(input('Enter your choice: '))# Perform the selected action. if choice == PURCHASE_ADULT: costAdult = purchaseAdult() elif choice == PURCHASE_CHILD: costKid = purchaseKid() elif choice == PURCHASE_MOUSE_EARS: costEars = purchaseEars() elif choice == PURCHASE_PARKING: costPark = purchaseParking(); elif choice == PURCHASE_FOOD: costFood…arrow_forward
- 8. Write a program: a menu-driven automatic teller program in which the user's bank balance is initialized to 2000 USD. The user should be allowed to perform as many transactions as he or she wishes from the menu. 1. Deposit 2. Withdrawal 3.See Balance 4.Exit For the withdrawal option, the user should be prompted to select from the choices $50, S100, S200, and S500 (do not allow the user to over draw). After each transaction, the program should print the current balance.arrow_forwardSubject Name: Software Engineering Question: From the following Scenario, Draw Sequence Diagram? Scenario: FIND THE TREASURE V The player starts playing the game. When he/she opens the game, he/she finds three options in the main menu from which he/she can select any one. The options are: i, How to play - It displays the instructions on how to play the game and which keys to use. * "Back" button will move the player back to the main menu. r "Exit" button will close the game. ii. Start game r It starts the first level of game. iii. Exit r It cancels playing the game. V Note that there are 5 levels with different difficulties. V In each level the player may take gifts and key. - Gift will add the score of player. - Key will move the player to next level. V For each level the player is given 3 lives. V If all the lives are finished, the level will be closed and the player has to again start playing that level. V The player can collect the key if he/she has collected minimum 3 gifts. V The…arrow_forwardProblem-Solving Activity 5: program that reads in 14 numbers Which loop (while, do-while, or ) is best to use in the following situations? The user must enter a set of exactly 14 numbers. A menu must be displayed for the user to make a selection. A calculation must be made an unknown number of times (maybe even no times). A series of numbers must be entered by the user, and terminated by a sentinel value. A series of values must be entered. The user specifies exactly how many.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT