Sales Bar Chart
Write a
Here is an example of the program’s output. User input is shown in bold.
Enter today’s sales for store 1: 1000[Enter]
Enter today’s sales for store 2: 1200[Enter
Enter today’s sales for store 3: 900[Enter]
DAILY SALES
(each * = $100)
Store 1: **********
Store 2: ************
Store 3: *********
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Starting Out with C++: Early Objects (9th Edition)
Additional Engineering Textbook Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Modern Database Management
Starting Out With Visual Basic (8th Edition)
- Remaining Time: 54 minutes, 49 seconds. * Question Completion Status: QUESTION 19 Write a Java program that prompts the user to enter the School Grade Level of a student and then calculate their discount amount in the regular fees structure offered during this pandemic situation. By using the below table, calculate their discount amount from the amount of the regular fee and then print the discount amount in OMR by using the appropriate selection structure. (Assume the user is entering a maximum Grade level is 12) discount amount = Regular Fees * percentage of discount rate School Grade Level Regular Fees in OMR Discount Rate >9 and 6 and 3 and 0 and <=3 30.500 5% otherwise 20.400 No discount T T T Arial 3 (12pt) v T -E E- 只i ン Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers TOSHIBA F5 F6 F7 F8 F9 F10 F11 F12 INS SCNULL LOCK AD & 67 7 V 8A9 4 0arrow_forwardComputer Science PYTHON PROGRAMMING Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. If the user's guess is higher than the randomly generated number, the program should display "Too high, try again." If the user's guess is lower, the program prints "Too low, try again." If the user guesses the number, the application should congratulate the user and generate a new random number so the game can start over. Keep track of the number of guesses a user makes before guessing the correct one and display it with the congratulatory message when the user guesses the number correctly. For this assignment, create functions that: generate and return a random number between 1 and 100. format and return the failure and congratulatory messages. Put these function in a module called helper.py and put the rest of the code in game.py. The game module must import the helper module. Please provide both helper.py & game.py…arrow_forwardLab 6: Multiplication Table Write a program that will continually ask the user to enter a positive number from standard input and print out the multiplication number table until user enters an alphabet (non number) to quit. Once user enters 'Q' or anything other than a number, the program will print out “Have a nice day" and then exit the program. After reading the user's input the positive number, the program will print out the multiplication table of the inputted number. For example, if user enters 5, the table should be: Multiplication table for 5 is: 2 3 4 5 4 6 8 10 9 12 15 8 12 16 20 5 10 15 20 25 Your program needs continuously ask the user to enter the a positive number until the user enters Q or q to exit the program. Your program must print out your names and lab info as you did in previous lab similar to the following: Program written by: Ron Sha Course info: Cs-102 Lab 6 - Multiplication Table Date: Wed Oct 14 11:35:18 2020 Activate un 1.2345arrow_forward
- Programming language is C#arrow_forwardne: ID: A 7. A game is played by moving a game piece left or right along a horizontal game board. The board consists of spaces of various colors, as shown. The circle represents the initial location of the game piece. Yellow Black Green Green Red Yellow Yellow Black Black Black The following algorithm indicates how the game is played. The game continues until the game is either won by landing on the red space or lost when the piece moves off either end of the board. Step 1: Place a game piece on a space that is not red and set a counter to 0. Step 2: If the game piece is on a yellow space, move the game piece 3 positions to the left and go to step 3. Otherwise, if the game piece is on a black space, move the game piece 1 position to the left and go to step 3. Otherwise, if the game piece is on a green space, move the game piece 2 positions to the right and go to step 3. Step 3: Increase the value of the counter by 1. Step 4: If game piece is on the red space or moved off the end of the…arrow_forwardSlot Machine SimulationA slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create a program that simulates a slot machine. When the program runs, it should do the following: Asks the user to enter the amount of money he or she wants to enter into the slot machine. Instead of displaying images, the program will randomly select a word from the following list: Cherries, Oranges, Plums, Bells, Melons, Bars To select a word, the program can generate a random number in the range of 0 through 5. If the number is 0, the selected word is Cherries; if the number is 1, the selected word is Oranges; and so forth. The program should randomly select a word from this list three times and display all three of the words. If none of the randomly selected words match, the…arrow_forward
- Transcribed Image Text Create a program that allows the user to do some basic functions. First, ask the user if they would like to find out sqrt, log or factorial of a number, then return the results. Here is the sample output: Welcome to the simple math helper. What would you like to calculate? 1. Sqrt 2. Log 3. Factorial > 1 Enter the number to sqrt: >9arrow_forward2. Big, Bigger, Biggest by CodeChum Admin Welcome to a game of Big, Bigger, and Biggest! The game where we give you three big numbers and you're going to choose which one is the biggest. Do your worst! Input 1. First integer Constraints This is guaranteed to be a whole number. 2. Second integer Constraints This is guaranteed to be a whole number. 3. Third integer Constraints This is guaranteed to be a whole number. Output The first line will contain a message prompt to input the first number.arrow_forwardMax Number Budi, Anto and Hani are playing a game called Max Number. Budi will ask Anto to say N numbers to put into a bag and also ask Hani to say M numbers and remove that number from the bag and next they will find the maximum number from the bag. Format InputThe first line contains two integers N stating total numbers that will be stored into bag and M stating the total numbers that want to be removed from the bag. The second lines contains N numbers that will be stored into the bag. The third lines contains M numbers that want to be removed from the bag. Format OutputOutput with a format “Maximum number is X”, where X is the maximum number in the bag. If no numbers in the bag, the application will give an output “Maximum number is -1” Constraints• 1 ≤ N ≤ 100• 1 ≤ M ≤ N• 1 ≤ numbers ≤ 999 Sample Input 1 (standard input)10 399 20 10 8 99 4 9 93 66 5599 94 10 Sample Output 1 (standard output)Maximum number is 93 Use C Language.arrow_forward
- The condition that controls a Do While loop must be true for the loop to be executed. Checkboxes are used in designing the user interface for situations where the user may choose only one of a few choices. Boolean variables are often used to improve the readability / clarity of the program code. For Next loops can have both negative and positive step values. If no item has been selected in a listbox, the SelectedIndex property of the listbox will have a value of zero. A Boolean variable must be initialized after the If instruction in which it is used is executed. A post-test loop is a loop that is designed to be executed at least once. In coding a Select Case instruction, the only thing that may appear after the Select Case keywords is a variable. A Do loop begins with the keyword Do and ends with the keyword Loop. The condition that controls a Do Until loop must be true for the loop to be executed. Radio buttons are used in designing the user interface for situations where the user…arrow_forwardTest2_Q2 Test Content Question 1 16 Points Write a JAVA program using loop that asks the user to input seven integer numbers representing. the humidity level in Bahrain for each of the day of the week (1 represents Sunday, 2 represents Monday, etc.). The program should find and display the following: 1- the maximum humidity level and the day on which it was recorded. 2- the number of days the humidity level was lower than 40. *Assume that there is only one maximum humidity level. Sample Input / Output Enter the humidity for 1 week: 57 61 37 49 50 62 38 The Maximum Humidity is 62 for the Week Day = 6 The no. of days the humidity level < 40 is 2 Note: Your answer should follow the given sample input / output.arrow_forwardAll coding is done in Java. I am using IntelliJ Idea if it helps. 12. Bar Chart Write a program that asks the user to enter today's sales for five stores. The program should display a bar chart comparing each store's sales. Create each bar in the bar chart by displaying a row of asterisks. Each asterisk should represent $100 of sales. Example: Enter today's sales for store 1: 1000 [Enter] Enter today's sales for store 2: 1200 [Enter] Sales Bar Chart Store 1: ********** Store 2: ************arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,