Modify your working program from Assignment #19 so that when the user enters data into the Selling Price and Purchase Price entry widgets and presses the "Compute Stuff!" button, it will calculate and display the Markup, Percentage Markup, and Profit Margin in the corresponding read-only entry widgets. Display data values using an appropriate number of decimal places. Marketing Problem Selling Price: Purchase Price Compute Stuff! Markup: Percentage Markup: Profit Margin:
Q: Example 3: Write pseudo code that performs the following: Ask a user to enter a number. If the…
A: - The question is to solve the example number 3.
Q: sing C#, write an application that computes the area of a circle, rectangle, and cylinder. Display a…
A: According to the Question below the Solution: Output:
Q: Write a program that can be used to assign seats for a commercial airplane. The airplane has 13…
A: As no programming language is mentioned, so I am using C++. In step 2, you will get C++ code. In…
Q: Study the pseudocode in picture above. Declare the variables testScoreString and classRankString.…
A: start input testScore, classRank if testScore >= 90 if classRank >= 25 then output…
Q: Write a program that allows a player to play Rock, Paper, Scissors. In this version, if there is a…
A: Find the required code in python as language not mentioned given as below and output :
Q: Write a Python program: Add a comment to say that this program allows conversion to either…
A: Program Approach - Declare the variables as per the requirement. Display the choices whether the…
Q: write a python application that can verify that the email has the corect Syntax. For example, that…
A: def isValid(Email): if Email.find(" ") != -1: return False if Email.find("@") == -1:…
Q: Write a program that reads from the user the cinema ticket price and the number of history cinema…
A: Hi, Since Programming language is not mentioned I have used Python.
Q: Modify songVerse to play "The Name Game" (OxfordDictionaries.com), by replacing "(Name)" with…
A: Here is the solution with an output:-
Q: Modify your working program from Assignment #19 so that when the user enters data into the Selling…
A: Description : Entry widgets are the basic widgets of Tkinter used to get input, for example text…
Q: Question Completion Status: def printing(pattern, number): for i in range(number): print ("**")…
A: According to the Question below the Solution: Output:
Q: 1. Write a program that will allow a student to calculate his/her test average of four test scores.…
A: // As per our guidelines we are supposed to answer only one question. Kindly repost other questions…
Q: You are to write a program that will handle the inventory for "widgets" - non-perishable hardware…
A: 1) what information will need to be stored in widget class ? in widget class you can declare cost of…
Q: A static method that accepts the radius of a circle and returns the area of the circle. Use the…
A: Geometry classpublic static class Geometry { public static double areaOfCircle(double radius) {…
Q: Write a program that computes and displays the charges for a patient's hospital stay. First, the…
A: Program: // Header files section#includeusing namespace std; //Functions prototypesdouble…
Q: discount chart should have three columns. The first column lists the items’ original price tag in…
A: Code: import java.util.Scanner;class Main{ public static double getValidPriceTag(Scanner…
Q: In this assignment you will write a program that shows the valid moves of chess pieces. Your program…
A: C++ Code : bool isValid(int c[][MAX], int n){ int a[] = { 0, -1, 0, 1 }; int b[] = { 1, 0, -1, 0…
Q: ify your program so every data entry statement uses a TryParse() method to ensure that each piece of…
A: It is defined as a powerful general-purpose programming language. It is used to develop desktop and…
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Since you haven't mentioned the programming language, we are answering this in C#.
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A: - We have to create a code for the ticket sales in C++. - We have to create a flowchart also.
Q: USING JAVA In this programming assignment, the user is asked to enter Full Name, gender, and age and…
A: Below I have provided Java Programming. Also, I have attached the screenshot of the code and output…
Q: Implement the following class. Refer to the below notes for more details. SimCard phoneNumber:…
A: Answer: Java Source Code: import java.io.*;class SimCard{ private String phoneNumber;…
Q: Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in…
A: Below is the required Flowchart: -
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: Use a Scanner instance for accepting input from user In the given piece of code, you are invoking…
Q: Sample Input 0 Sample Output 0 Enter the number of students: Average weight of all students is…
A: Solution for above program is given below -
Q: Write a program that prompts the user to enter the year andfirst day of the year and displays the…
A: Create an object of a Scanner class for the inputs. Input the number of the year. Input the number…
Q: Written in python. This file is about rectangles. It requires a main function and three custom…
A: Below is the required code in python and sample output:
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Program: #include <iostream> #include <iomanip> using namespace std; void…
Q: Write an application that determines whether a phrase entered by the user is a palindrome. A…
A: import java.util.*; class palindrome{ void palin(){System.out.print("Enter the string you want…
Q: Write a program that computes and displays the charges for a patient's hospital stay. First, the…
A: The above question is solved in step 2 :-
Q: For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a…
A: c# program for Pizza Price using System; class MainClass { public static void Main (string[] args)…
Q: Optional parameters are represented with the following character: a. > b. = c. * d. ! e. ?
A: Optional parameters must be specified some value at the end of parameter otherwise it will throw…
Q: Write a program that calculate electricity bill. The program prompts the user to enter the amount of…
A: C program #include <stdio.h>int main(){ int un; float amt; /* Input units consumed…
Q: Write a program that uses different operators; and Use the methods of the Math class. nstructions:…
A: PROGRAM EXPLANATION Create a class as given in the question. Take 5 grades as input from the user.…
Q: Create a program for a new school where it promps the user for a student number in the school and…
A: The program code is provided below.
Q: In this lab, you use the flowchart and pseudocode found in the figure below to add code to a…
A: Required Java code is provided below :
Q: Here is the question: Write an application that counts the total number of spaces contained in a…
A: import java.util.*; public class CountSpaces2{ public static void main(String[] args) {…
Q: Note: The code is written you can just tell the explanation what is happening in the code Explain in…
A: The program is for getting next prime number. The explanation of the following code is given by:…
Q: Find the numbers that can be expressed as the product of two nonnegative integers in succession and…
A: Script:- #reading the input number fromm user read -p "Enter number: " number #setting count to 0,…
Q: (3-) Tony has succeeded in all his previous projects. Tony is (very delighted) to do another…
A: The Answer is given below step.
Q: 1. Write a program that will allow a student to calculate his/her test average of four test scores.…
A: Code: import java.util.*;public class Main{ public static void main(String[] args) { //declaring…
Q: There is a problem in the below code. Please add one line to fix it. Scanner input = new…
A: Fix the given Code: Scanner input = new Scanner(System.in); System.out.println("Enter the…
Q: Can you create a flowgorithm for this below?
A: #include<stdio.h> #include<stdlib.h> #include<stdbool.h>…
Q: Write a program that asks the user for the number of males and the number of females registered in a…
A: Note : Since it is not mentioned which programming language to use so, i preferred to use Python…
Q: Create a program called "Geometry" Prompt the user for a small decimal number. Prompt the user for…
A: Input : Lower and the upper bound float from the user Output : Random number generated from in…
Q: Look at this program: int main() { int x = 4; displayMessage(); return 0; } void…
A: Any function that is called before it has been defined or declared, will result in a compilation…
Q: Write an application in which the user can enter a date using digits and slashes (for example,…
A: We use the split function to parse the date correctly.
Q: Program4 - (from ch7) - Computer-Assisted Instruction (Project Name: AITeacher) - The use of…
A: Actually, given information: The use of computers in education is referred to as computer-assisted…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- What is the output of the following code segment?inte=5,f=10;if(eff0)Write(Purple) inte=5,f=10;if(eff0)Write(Purple) else Write(Gold); Purple Gold PurpleGold nothingWrite an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average.this assignment wants me to: Convert the QuartsToGallons program to an interactive application. Instead of assigning a value to the number of quarts, accept the value from the user as input. my code is . it is saying that they can not find symbol in quartsNeeded=input.NextInt(); final int QUARTS_IN_GALLON = 4; int quartsNeeded = 18; int gallonsNeeded; int extraQuartsNeeded; Scanner input = new Scanner(System.in); System.out.print("Enter quarts >>"); quartsNeeded = input.NextInt(); gallonsNeeded = quartsNeeded / QUARTS_IN_GALLON; extraQuartsNeeded = quartsNeeded % QUARTS_IN_GALLON; System.out.println("A job that needs " + quartsNeeded + " quarts requires " + gallonsNeeded + " gallons plus " + extraQuartsNeeded + " quarts.");
- 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 random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "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. Additional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.good day i need to output this code below and then also make the use of the following interface iDance{ public String getLocation(); public String getName(); public double getHourlyRate(); }Python - question down below This is my code for a horse racing betting game Code : import randomdef Readysetgo(horses):shuffled = random.sample(horses,len(horses))return shuffled horses = [1,2,3,4]ch=1balance = 200while(ch!=0):print("Please select from the following options 1-6")print("1. Place an exact bet")print("2. Place an exactabox bet")print("3. Place a trifectabet")print("4. Please a trifectabox bet")print("5. See your USD balance")print("6. Exit")ch = int(input())if ch==1:balance -= 10shuffled = Readysetgo(horses)print("Guess the exact winning order of the top two horses.")x,y = input().split()x = int(x)y = int(y)if x==shuffled[0] and y==shuffled[1]:balance += 100elif ch==2:balance -= 5shuffled = Readysetgo(horses)print("Guess the top two horses in any order.")x,y = input().split()x = int(x)y = int(y)if (x==shuffled[0] and y==shuffled[1]) or (x==shuffled[1] and y==shuffled[0]):balance += 50elif ch==3:balance -= 25shuffled = Readysetgo(horses)print("Guess the exact winning…
- Implement the design of the Travel class in python so that the following output is produced: You are not allowed to change the code below # Write your code hereprint(“No. of Traveller =”, Travel.count)print("=======================")t1 = Travel("Dhaka","India")print(t1.display_travel_info())print("=======================")t2 = Travel("Kuala Lampur","Dhaka")t2.set_time(23)print(t2.display_travel_info())print("=======================")t3 = Travel("Dhaka","New_Zealand")t3.set_time(15)t3.set_destination("Germany")print(t3.display_travel_info())print("=======================")t4 = Travel("Dhaka","India")t4.set_time(9)t4.set_source("Malaysia")t4.set_destination("Canada")print(t4.display_travel_info())print("=======================")print(“No. of Traveller =”, Travel.count) output: No. of Traveller = 0=======================Source: DhakaDestination:IndiaFlight Time:1:00=======================Source: Kuala LampurDestination:DhakaFlight Time:23:00=======================Source:…Write a program that generates a random number in the range of 1 through 1000, and asks the user to guess what the number is. If the user guess is higher than the random number, the program should display Too high, try again. If the users guess is lower than the random number, the program should display 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. If the user doesn't want to continue the game the user should type an appropriate stop symbol to terminate the program (such stop conditions were discussed in the class). For each game iteration, count the number of guesses made by the user and display them. The program should contain the following functions: check_guess(): this function checks if the user's guess is lower, higher or equal to the random number. random_gen(): function that generates one random number for one game iteration main(): the function where the program…this assignment wants me to: Write an application that computes and displays the day on which you become(or became) 10,000 days old. For example, if you we're born on January 1st, 2000, the output would be I will be 10000 days old on 2027-05-19. It is giving me errors in the picture shown in here. here is my code: import java.time.*; import java.util.Scanner; public class TenThousandDaysOld { public static void main(String[] args) { Scanner in = new Scanner(System.in); int month; int day; int year; int daysOld = 10000; System.out.println("Enter month"); month = in.nextInt(); System.out.println("Enter day"); day = in.nextInt(); System.out.println("Enter year"); year = in.nextInt(); LocalDate birthDate = LocalDate.of(year, month, day); LocalDate futureDate = birthDate.plusDays(daysOld); System.out.println("I will be " + daysOld + " old on " + futureDate); } }
- Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. ***Java please***my assignment wants me to Convert the MileConversions program to an interactive application. Instead of assigning a value to the miles variable, accept it from the user as input. Something is wrong with my code My code is : { public static void main(String[] args) { Scanner inputDevice = new Scanner(System.in); final double INCHES_IN_MILE = 63360; final double FEET_IN_MILE = 5280; final double YARDS_IN_MILE = 1760; double miles = 4; double in, ft, yds; in = miles * INCHES_IN_MILE; ft = miles * FEET_IN_MILE; yds = miles * YARDS_IN_MILE; System.out.println(miles + " miles is " + in + " inches, or " + ft + " feet, or " + yds + " yards"); } }In this assignment you will demonstrate your knowledge of debugging by fixing the errors you find in the program below. Fix the code, and paste it in this document, along with the list of the problems you fixed.This example allows the user to display the string for the day of the week. For example, if the user passed the integer 1, the method will return the string Sunday. If the user passed the integer 2, the method will return Monday. This code has both syntax errors and logic errors. Hint: There are two logic errors to find and fix (in addition to the syntax errors).Inport daysAndDates.DaysOfWeek;public class TestDaysOfWeek {public static void main(String[] args) {System.out.println("Days Of week: ");for (int i = 0;i < 8;i++) {System.out.println("Number: " + i + "\tDay Of Week: " + DaysOfWeek.DayOfWeekStr(i) )}}}package daysAndDatespublic class DaysOfWeek {public static String DayOfWeekStr(int NumberOfDay) {String dayStr = ""switch (NumberOfDay) {case 1:dayStr =…