Q2: How can several variables be written in successive lines as outputs with one commands?
Q: Write a Guess the Number game that has three levels of difficulty. The first level of difficulty…
A: I have provided C CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT----------
Q: A mobile phone service has three different data plans for its customers: PLAN A: For $19.99…
A: Note: - Since the programming language is not mentioned to write the program. The below code is…
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: Jessie has a lot of cooking with her (N). He often remembered the first few letters of the recipe…
A: Input-Output Details: First line contains an integer N - the number of recipes. Followed by N…
Q: enders) and output their resulting relationship based on the FLAMES method: F – Friends L – Lovers…
A: The task here includes various operations such as arithmetic operation, logical operation, etc.…
Q: Write a C++ program in Microsoft Visual Studio 2019, use only strings and functions. You need to…
A: Given: C++ program to perform: Create a game using strings. First, generate a random letter from…
Q: Jessie has a lot of cooking with her (N). He often remembered the first few letters of the recipe…
A: Input-Output Details: First line contains an integer N - the number of recipes. Followed by N…
Q: en submitting this lab, submit a java file called Switch, and create the following structure in…
A: Java is a programming language that is commonly used for desktop applications, mobile apps, web…
Q: You are part of a team writing a system which keeps track of envelopes people send through the…
A: Answer is
Q: You are roaming in a random city and you have los to X and Y street if 1 <= Y - X <= K, where K is a…
A: I have written the Ruby code below:
Q: Ruby Programming: Write a function that takes a number x as a parameter and returns the value of…
A: Write a function that takes a number x as a parameter and returns the value of x2. Solution: Square…
Q: Program Specifications Write a FancyCar class to support basic operations such as drive, add gas,…
A: Below I have provided Python Programming. Also, I have attached the screenshot of the code and…
Q: At a certain university, students have to submit their exams online. The administration decides that…
A: Code import java.util.*;public class Main{ public static void main(String[] args) { int…
Q: Assignment 2C: Useful Conversions: We are familiar with converting information from one format to…
A: C++ code: #include <iostream>#include <iomanip>using namespace std;#define MOON…
Q: There are 4 types of passengers in the system: Standard: This is the most common type of passenger…
A: Polymorphism in Java is the ability of an object or method to take on various forms based on the…
Q: Write a program that moves a forester unit and a desert corps unit to a given target location and…
A: Answer : #include <iostream> #include <math.h> #include <string.h> using namespace…
Q: Using any programming language, write a program that will solve the given problem below: Write a…
A: The answer is coded in Python Language.
Q: working on writing a C# console application that has a menu allowing an instructor to: 1.Enter…
A: Please find the answer below
Q: Assuming that you have the functions "drawPolygon(int|] x, y, int n)" for drawing polygon,…
A: For generating the question diagram, these function calls would be made as we just need to call the…
Q: Use this code template to continue the code: public Item(String name, double weight, int value)…
A: Use this code template to continue the code:......
Q: Your program has a list of professors and their office location and office hours per day of the…
A: Dear Student, The source code, implementation and expected output is given below -
Q: William is facilitating a get-together for n of his broker companions. They began a conversation on…
A: Here have to determine about William's companion problem statement.
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Given: Write a program that simulates the proverbial game of Russian Roulette. Theprogram will…
Q: Context: I made a program that allowed the user to play TOWERS OF HANOI. user can perid the amount…
A: Program for Tower of Hanoi Difficulty Level : Medium Last Updated : 08 Jul, 2021 Tower of…
Q: Loop through the animalList created in a previous question and print the total time taken and total…
A: Here, we have to choose an option for the above question.
Q: In this assignment, you are going to complete a program that compute gross and net payment based on…
A: Step 1 : Start Step 2 : declare variablesStep 3 : input hoursStep 4 : calculate and print gross…
Q: This is the code that needs to be updated: .ORIG x3000 LD R0, NUM LD R1,…
A: Start.Load the values NUM and DEN into registers R0 and R1, respectively.Call the GCD (Greatest…
Q: Ruby Programming: You are roaming in a random city and you have lost. You see a sign board and where…
A: Introduction: As per the given problem statement, find the way using the street and develop Ruby…
Q: Where can you find MIN_VALUE and MAX_VALUE constants? Java doesn't have constants In…
A: In Java, certain constants such as MIN_VALUE and MAX_VALUE are crucial when working with primitive…
Q: You decide to buy some stocks for a certain price and then sell them at another price. Write a…
A: Write a program that determines whether or not the transaction was profitable. If your transaction…
Q: Blackjack is a card game sometimes called Twenty-One. The object of Blackjack is to have a hand of…
A: Below I have provided a python program for the given question. Also, I have attached a screenshot of…
Q: Create a card game in which the dealer shuffles the deck and deals 13 cards to the player. The…
A: Algorithm : The algorithm for the above code is as follows:1. Start2. Create a deck of cards.3.…
Q: A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program for a game that consists of two players. The rule of the game is that player 1…
A: For the above problem, I am going to provide a solution in python.
Q: Write a program that creates a login name for a user, given the user's first name, last name, and a…
A: Start Accept first name from the user Accept last name from the user Accept number from the user…
Q: use this code template to help you continue:
A: public class Item { private final String name; private final double weight; private final…
Q: For the 8 Java statements below, identify each of the following statements as legal or illegal, and…
A: The answer of the question is given below:
Q: is
A: I have divided this into many functions, and listed below are some of those which may help you…
Step by step
Solved in 2 steps with 1 images
- Hello, This is part of my hangman simulation in C++. If you compile and run it and type "Easy," the code should run. If you run it though, the body of the hangman doesn't align when you guess wrong. Could you help me with that and implement an if statement to repeat the program if user wants to play again? #include <iostream> #include <cstdlib> #include <ctime> #include <string> #include <iomanip>using namespace std; const int MAX_TRIES = 5;char answer; int letterFill(char, string, string&); int main() { string name; char letter; int num_of_wrong_guesses = 0; string word; srand(time(NULL)); // ONLY NEED THIS ONCE! // welcome the user cout << "\n\nWelcome to hangman!! Guess a fruit that comes into your mind."; // Ask user for for Easy, Average, Hard string level; cout << "\nChoose a LEVEL(E - Easy, A - Average, H - Hard):" << endl; cin >> level; // compare level if (level == "Easy") {//put all the string inside…Write the following function that draws a line from point (x1, y1) to (x2, y2) with color (default to black) and line size (default to 1).def drawLine(x1, y1, x2, y2, color = "black", size = 1):IN C++ Create a task that takes a series of card numbers and checks that their total value is more than 21. If the amount is more than 21, return the truth and if the amount is less than or equal to 21, return false. My card prices are as follows: 2-10 their number. J-K (face cards) are counted as 10. Aces counts as 1 or 11 - play save, so if you give the ace an 11-point make you lose and 1 let you win, then go with 1. Examples overTwentyOne (["2", "8", "J"]) – lie overTwentyOne (["A", "J", "K"]) – - lie overTwentyOne (["5", "5", "3", "9"]) - true
- How do I Create a simple multiplication table application using java? The application will prompt the user for the multiplication table width. (values 3-10 are valid) For example, if they enter 10 the output would be: Enter table width > 10Enter table width > 10 Precede each entry with a 0 if the digit is less than two characters long as shown above. During your testing you can see what happens when you enter a width too large. Keep it between 3 and 10. This what I have import java.util.Scanner;public class MultiplicationTable {public static void main(String[] args) {Scanner input = new Scanner(System.in);String numChoiceString;int numChoice;System.out.println("Enter table width > ");numChoiceString = input.next();numChoice = Integer.parseInt(numChoiceString);System.out.print("*********MULTIPLICATION TABLE********* \n");for(int i=1; i <= 10; i++){ for(int j=1; j <= 10; j++){System.out.print(i*j+"\t");}System.out.println();}}}# Write python codes here.print("Total E-Customer:", ECustomer.count)c1 = ECustomer("James")c1.setProductDetails("TV",35000,"Air Cooler", 9000)c2 = ECustomer("Mike")c2.setProductDetails("Mobile",20000,"Headphone",1200,"Fridge", 45000)c3 = ECustomer("Sarah")c3.setProductDetails("Headphone", 1200)print("=========================")c1.printDetail()print("=========================")c2.printDetail()print("=========================")c3.printDetail()print("=========================")print("Total E-Customer:", ECustomer.count)Output:Total E-Customer: 0=========================Name: JamesProducts: TV, Air CoolerTotal cost: 44000=========================Name: MikeProducts: Mobile, Headphone, FridgeTotal cost: 66200=========================Name: SarahProducts: HeadphoneTotal cost: 1200=========================Total E-Customer: 3Instructor note: This lab is part of the assignment for this chapter. This lab uses two Java files, LabProgram.java and SimpleCar.java. The SimpleCar class has been developed and provided to you already. You don't need to change anything in that class. Your job is to use the SimpleCar class to complete the specified tasks in the main() method of LabProgram.java Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar object that performs the following operations: Drives input number of miles forward Drives input number of miles in reverse Honks the horn Reports car status The SimpleCar class is found in the file SimpleCar.java. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 miles
- Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name. Hint: Use the to_string() function to convert numerical data to a string.A company wants to know the percentages of total sales and total expenses attributableto each salesperson. Each person has the following data: name – last name and firstname, sales, and expenses. Write a program that produces a report with a header linecontaining the total sales and total expenses. Following this heading should be a tablewith each salesperson’s name, percentage of total sales, and percentage of totalexpenses sorted by the salesperson’s name. Use a total of 25 records for this project.Task 2:Modify main() so that it asks the user for a second number to be searched for, and makethe text give an answer like in the example runs based on the return value fromcountElement() instead of counting. Example run: Example runs (user input in bold, comments not partof the output initalic):Number: 5Number: 7Number: 3Number: 9Number: 1Number: 10Number: 8Number: 1Number: 9Number: 7What to search for: 9And another number to search for: 1Both numbers occur in the arrayAnother example, same array as above: What to search for: 9And another number to search for: 13One of the numbers occurs in the arrayYet another example, same array as above:What to search for: 24And another number to search for: 13None of the numbers occur in the array
- Where do calls and returns fall into the grand scheme of things, and can you provide any concrete examples?I'm running a 5-star restaurant and I can only have the best items on my menu. My menu offers 6 items, each represented by a number from 1-6. If an item on my menu does not sell or does not sell that much compared to others, I must act and replace it with something that sells! Identify which dishes do not sell. If every dish sells, print the set of dishes that were ordered least. Input: A single line containing the dish number that were ordered. Treat as one number. INPUT: 156356231 Output: The list of dishes not ordered in numerical order. If every dish sells, print the set of dishes that were ordered least. Separate each number with a new line. OUTPUT: 4Write the part of the program that searches for the name of the coffee add-in(s) and either prints the name and price of the add-in or prints the error message if the add-in is not found. Comments in the code tell you where to write the statements. Write the code that searches the list for the name of the add-in ordered by the customer. Write the code that prints the name and price of the add-in or the error message, and then write the code that prints the cost of the total order. Execute the program using the following data and verify that the output is correct: Cream Caramel Whiskey chocolate Chocolate Cinnamon Vanilla # JumpinJava.py - This program looks up and prints the names and prices of coffee orders. # Input: Interactive # Output: Name and price of coffee orders or error message if add-in is not found # Declare variables. NUM_ITEMS = 5 # Named constant # Initialized list of add-ins addIns = ["Cream", "Cinnamon", "Chocolate", "Amaretto", "Whiskey"] #…