Can u debug this Program gets a store's department code and a sale transaction value // Output is a list of department codes, names, and total sales // Additionally, a grand total sales value is displayed start num dept num saleValue num NUM_DEPTS = 5 num total[NUM_DEPTS] string DEPT_NAME[NUM_DEPTS] = "Women's apparel", "Men's apparel", "Children's apparel", "Cosmetics", "Accessories", num grandTotal input dept, saleValue while not eof total[dept] = total[dept] + sale endwhile while dept < NUM_DEPTS output dept, DEPT_NAME[dept], total[dept] endwhile output "Grand total", grandTotal stop
Q: This following program is intended to print something sensible. .ORIG LEA R1, ? ADD R1, R1, -2 LDR…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Python: On-line Grocery Shopping Use grocery py in Canvas to start your program. It contains two…
A: Answer: Code: food = ["tomato_soup", "cheese", "sauce", "chicken"] stock = {"tomato_soup": 20,…
Q: 7.10 LAB: Mad Lib - loops (edited) Mad Libs are activities that have a person provide various words,…
A: Since you are not specifying any language for implementation, I choose python language. Program…
Q: // JumpinJava.cpp - This program looks up and prints the names and prices of coffee orders. //…
A: Answer: Note: Two possible solutions are provided as no output or output format was specified,…
Q: his is the code that is asked to be solved by repeating the question: #include #include int…
A: Task : Given the C code. The task is to rewrite the code using strncat() function.
Q: c++ commas.cpp) Write a program that accepts a 7-9) digit integer and echoes the number with commas…
A: This program can be solved using modulo and divide operation.
Q: Write a program that takes 3 integers as an input from the user and display them in ascending order…
A: // here is my c++ code #include <iostream>// header file using namespace std;void…
Q: IN C++ Only Jessie has a lot of cooking with her (N). He often remembered the first few letters of…
A: It is defined as a powerful general-purpose programming language. It can be used to develop…
Q: 9.15 REQUIRED LAB 9C: Output values below an amount Write a program that first gets a list of…
A: Code: # user input as a stringdata=input('Data list : ') # split integer values to store in…
Q: #include #include using namespace std; int main() { // Declare variables. string…
A: #include <iostream> #include <string> using namespace std; int main() { // Declare…
Q: Science P4.13The dew point temperature T. can be calculated (approximately) from the relative…
A: We have to write JAVA Code for following question:
Q: 15.9.1: LAB: Ticketing service (queue) Given main(), complete the program to add people to a queue.…
A: Source code in C++ #include <queue>#include <iostream>using namespace std;int main (int…
Q: PROBLEM 7 Write a program that prompts the user to input two integers and prints a list of all the…
A: ALGORITHM:- 1. Take input for both the numbers. 2. Traverse for all the numbers until the smaller of…
Q: //Please Fix this program #include using namespace std; class student { int snum; char sname[20];…
A: We have a C++ program and we need to fix the issues in this program.
Q: Part A Find a list of all of the names in the following string using regex. In [ ]: import re def…
A: The answer is given below:-
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Please find the answer below :
Q: and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is…
A: According to the question, we are going to create a program where the temperature will be shown in…
Q: Question 4: (Same-number subsequence) Write an O(n) program that prompts the user to enter a…
A: According to the Question below the Complete Program: Program Output:
Q: Write a program that takes 3 integers as an input from the user and display them in ascending order…
A: Required: Program to take user input for three numbers, sort them and print using functions.…
Q: Write the code below and precisely produce the output below. Save the code as PE4_3.py. a) Create a…
A: To display print statement in python is used. len function finds the length of list use indexing to…
Q: Please code in python Forbidden concepts: recursion, custom classes Create a program that…
A: # program to get name and category they belong on babsis of parental income # class class Student:…
Q: Python: On-line Grocery Shopping Use grocery py in Canvas to start your program. It contains two…
A: Python used to answer this question
Q: Consider records of employees each consists of employee's first name (string), number of hours…
A: I give the code in python along with output and code screenshot
Q: (Sort three numbers) Write the following function to display three numbers in increasing order: def…
A: #method to sort and display the given numbersdef displaySortedNumbers(num1, num2, num3): #now…
Q: C++ part 4: I have these error i am missing the ExecuteMenu Function This is my code so far.…
A: Given: C++ part 4: I have these error i am missing the ExecuteMenu Function This is my code so…
Q: Code Example: def get_volume (width, height, length=2): width * * height length volume return volume…
A: Functions in python: A function is a group of connected claims that together carry out a…
Q: 1. Write a program that calculates the user's body mass index (BMI) and categorizes it as…
A:
Q: //////////// //////////// //////////// please help me solve this problem in java
A: Program Instructions:Use scanner class object to read the three integers.Create a method names…
Q: what is wrong with this programming? #include #include using namespace std; int main() { string…
A: #include <iostream>#include<bits/stdc++.h>using namespace std;int main(){string…
Q: // JumpinJava.cpp - This program looks up and prints the names and prices of coffee orders. //…
A: Coded using C++.
Q: 6330 ı you wir e tU WI e your aLateeLa. Instructions Lilal 1. Study the prewritten code to make…
A:
Q: A number in base 2 (binary) is a number such that each of its digits is 0 or 1. To convert from…
A: Since the programming language is not mentioned, we are providing the answer in Java language.
Q: 1.16 LAB: Input: Mad Lib Mad Libs are activities that have a person provide various words, which are…
A: According to the question Coding, language is not mentioned to write a particular programming…
Q: python nMath: pentagonal numbers) A pentagonal number is defined as n(3n-1)/2 for n=1,2,..., and so…
A: Declare a count variable that is used to display the first 10 numbers in each line. Using for loop,…
Q: What is wrong with the next programming? #include #include using namespace std; int main(){…
A: According to the question below the Solution: Error:
Q: Exercise 5: Write a Python program that reads from an input from user n student test scores in the…
A: Algorithm: - To Solve this problem we will mainly use the if-else condition inside the For…
Q: Complete the Funnyville High School registration program where user is prompted for her full name…
A: Program to generate emailId and temporary password given a students' full name for funnyville high…
Q: Create a program which will ask the user to enter a list of names and provide a poker tournament…
A: As the programming language is not mentioned here, we are using JAVA The complete code is given…
Q: For this code, just explain the void pop function, with each and every line. And please provide…
A: POP function:- Basically POP function created to remove the top elements l from the stack.
Q: This expands the previous work to enable handling multiple employees. You will do this by…
A: #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int…
Q: Modify the sample code to prompt the user for a name. Have the program search the existing list for…
A: Lets see the solution.
Q: .Prime Numbers In this task, you will implement a program that takes as input a number n and…
A: Given, Pseudocode of isPrime() function: Step 1: count = 2Step 2: while count < numberStep 3: if…
Q: Why is the code I wrote wrong? Could someone explain why? I do not understand why.
A: The program needs to take care of the special case of user input '-' (dash). The program is divided…
Q: Q3, A lecturer intends to separate his students into 2 groups based on their INDEX Numbers, those…
A: Multiple question asked answering Q3, repost the remaining. Code: //header file #include…
Q: Write code using 999999999888888887777777666666555554444333221 Note; create means you must create…
A: Objective: This program should receive user input for the number of lines to display a pattern. The…
Q: In the following declaration: string *var1, var2; O var1 is a pointer to a string, var2 is a string…
A: Pointers must be declared before they can be used, just like a normal variable. A pointer is…
Q: 3.3.2: Nested loops: Print seats. Given numRows and numColumns, print a list of all seats in a…
A: NOTE - I have used python programing language to solve the problem. Here I have taken input from the…
Q: Programming Exercise 10 in Chapter 6 asks you find the mean and standard deviation of five…
A: The solution to the given problem is below.
Q: Three numbers a. Write a program that reads three numbers and prints “all the same” if they are all…
A: Note:- Since programming language is not mentioned we are providing solution in c++ . please repost…
Q: python Geography Grades 3 Make a copy of your program for the problem Geography Grades 2 and change…
A: Answer: I have done in python also I have attached python code .
Can u debug this
Program gets a store's department code and a sale transaction value // Output is a list of department codes, names, and total sales // Additionally, a grand total sales value is displayed
start
num dept
num saleValue
num NUM_DEPTS = 5
num total[NUM_DEPTS]
string DEPT_NAME[NUM_DEPTS] = "Women's apparel", "Men's apparel", "Children's apparel", "Cosmetics", "Accessories",
num grandTotal
input dept, saleValue
while not eof
total[dept] = total[dept] + sale
endwhile
while dept < NUM_DEPTS
output dept, DEPT_NAME[dept], total[dept]
endwhile
output "Grand total", grandTotal
stop
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Write a program to process a collection of the speeds of vehicles. Yourprogram should count and print the number of vehicles moving at a highspeed (90 miles/hour or higher), the number of vehicles moving at amedium speed (50–90 miles/hour), and the number of vehicles moving ata slow speed (less than 50 miles/hour). It should also display the categoryof each vehicle. Test your program on the following data:Speed of vehicles (in miles): 43 23 54 57 68 67 51 90 33 22 1188 34 52 75 12 78 32 89 14 65 67 97 53 10 47 34b. Modify your program to display the average speed of a vehicle (a realnumber) at the end of the run.Perform the following. 1) Conver the infix expression a/b-c+d*e-a*c into postfix expression and trace that postfix expression for given data a=6, b=3, c=1, d=2 , e=4 .2) A student is asked to develop an application as part of mini project which reverses the order of numbers, such that the number that is placed last in the list will be removed first. The list can hold any number of elements. Implement the following menu based C++program for the same.A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes in word pairs that consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Ex: If the input is: Joe 123-5432 Linda 983-4123 Frank 867-5309 Frank the output is: 867-5309 please make it simple im a starter at python
- A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Ex: If the input is: 3 Joe 123-5432 Linda 983-4123 Frank 867-5309 Frank the output is: 867-5309 Your program must define and call the following function. The return value of GetPhoneNumber is the phone number associated with the specific contact name.string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName) #include <iostream>#include <vector>using namespace std; string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName) {} int main()…Can you fix the code of the completion time based on the gantt chart and the output of the completion time must be the same in the image below? Thank you!Code: #include <iostream>#include <queue>#include <string>#include <vector> struct Process { int processId; int burstTime; int priority;}; void print_gantt_chart(const std::vector<std::pair<int, int>>& gantt_chart) { std::cout << "Gantt Chart:" << std::endl; std::cout << "----------------------------------------------------------------------------" << std::endl; std::cout << "| "; for (const auto& process : gantt_chart) { std::cout << "P" << process.first << " | "; } std::cout << std::endl; std::cout << "----------------------------------------------------------------------------" << std::endl; std::cout << "0 "; int currentTime = 0; for (const auto& process :…Write a function randomList() that gets three integers as parameters, start, bound and k. This function will create a list of k randomly generated integer numbers between start and bound values (both inclusive), and return the created list.Write a function sqrtList() that gets a list as parameter, print the numbers in the list and their square root. The square roots will be printed with 3 decimal digits. Write Python statements that ask the user to input start, bound and k values, then call the method to perform the calculations and produce the output.At the end print average of numbers by calling the function calculateAverage(). Part-2:Enter start: 10Enter end: 30Enter k: 41. number: 28 Square root = 5.2922. number: 22 Square root = 4.6903. number: 10 Square root = 3.1624. number: 16 Square root = 4.000Average of numbers is = 19.0
- Write a function randomList() that gets three integers as parameters, start, bound and k. This function will create a list of k randomly generated integer numbers between start and bound values (both inclusive), and return the created list.Write a function sqrtList() that gets a list as parameter, print the numbers in the list and their square root. The square roots will be printed with 3 decimal digits. Write Python statements that ask the user to input start, bound and k values, then call the method to perform the calculations and produce the output.At the end print average of numbers by calling the function calculateAverage().Write code in C++, C# or Python to solve the following problem: In a party there are N persons and we have M raffles. One person may participate in any number of raffles (from 0 to M). At the end of the day, host of the party comes to you and gives you M lists. Each list contains multiple integer numbers which are the "raffle ID numbers" of the participants. Then, for each list an integer number, I, is announced to determine the winner of the raffle: the winner is the person with raffle ID number K such that K is larger than exactly I numbers in that list. To help the host to find the winners you want to write a program. Input Format First line of the input is N and M. Then, there are M lines, each one contains integer numbers between 1 and N. Each list may contain at most N numbers. At the end of each line there is -1. After these lines there is one line which contains M integers to announce the winners. If the j-th number in this line is I it means that the winner of list j…In Python please! 15.7 LAB: All permutations of names Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names, then use a recursive method to create and output all possible orderings of those names, one ordering per line. When the input is: Julia Lucas Mia then the output is (must match the below ordering): Julia Lucas Mia Julia Mia Lucas Lucas Julia Mia Lucas Mia Julia Mia Julia Lucas Mia Lucas Julia Code so far: def all_permutations(permList, nameList): # TODO: Implement method to create and output all permutations of the list of names. if __name__ == "__main__": nameList = input().split(' ') permList = [] all_permutations(permList, nameList)
- 1. Write a python program called a2_q1.py that asks the user (business owner) for their product information and creates an electronic list (e-list) of items. In part-2 of this assignment, customers should be able to use this e-list to purchase multiple products of varying quantities while products are available in stock.Your program should start by asking the business owner’s name (string) and the name of the company (string). Next, it should ask for three (3) product names (strings), their unit prices (floats), and the total number of products in stock (ints). Finally, it should display the list of items. Note: users are always allowed to enter any type of data when asked for input. Your program must always verify the user input. Invalid input should be handled with suitable error messages for each type of invalid input and the prompt should be repeated. To keep things simple, we will consider that when prompted a user can enter either an integer, a string, or a float (i.e., not a…Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice costs $2.5, but the price varies with the amount that he purchases. The following table shows the discount that Jacob receives. Order Volume Discount Rate >= 200 bags 25% off 120 - 199 bags 20% off 60 - 119 bags 15% off 40 -59 bags 10% off 20 – 39 bags 5.5% off 0-19 bags No discount (1) Inyourprogram,definevariableswithmeaningfulnamestoacceptuserinputonordervolume, and calculate total ordering cost based on the order volume inputted. Use if-else statements to handle the calculations for different order volumes as shown in the above table. (2) Yourprogramshouldprintoutuserordervolume,discountrate,andtotalorderingcostinconsole (similar to the following sample outputs)C++ Create a Blackjack (21) game. Your version of the game will imagine only a SINGLE suit of cards, so 13 unique cards, {2,3,4,5,6,7,8,9,10,J,Q,K,A}. Upon starting, you will be given two cards from the set, non-repeating. Your program MUST then tell you the odds of receiving a beneficial card (that would put your value at 21 or less), and the odds of receiving a detrimental card (that would put your value over 21). Recall that the J, Q, and K cards are worth ‘10’ points, the A card can be worth either ‘1’ or ‘11’ points, and the other cards are worth their numerical values. FOR YOUR ASSIGNMENT: Provide two screenshots, one in which the game suggests it’s a good idea to get an extra card and the result, and one in which the game suggests it’s a bad idea to get an extra card, and the result of taking that extra card.