2.12 LAB: Driving costs Driving is expensive. Write a program with a car's gas mileage (miles/gallon) and the cost of gas (dollars/gal output the gas cost for 20 miles, 75 miles, and 500 miles. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print (f' {your_value1:.2f} {your_value2:.2f} {your_value3:.2f}') Ex: If the input is: 20.0 3.1599 where the gas mileage is 20.0 miles/gallon and the cost of gas is $3.1599/gallon, the output is: 3.16 11.85 79.00 Note: Real per-mile cost would also include maintenance and depreciation
Q: A contract review can be performed by "insiders" (members of the organization's proposal team or…
A: 1. Advantages: – Outsiders assure more independence of reviews. – Outsiders may be chosen to possess…
Q: reference bandwidth is a default value on Cisco router divide the reference bandwidth by the…
A: Introduction: The reference bandwidth is a default value on Cisco routers which is a 100Mbit…
Q: List the supplier's capability issues that should be considered by the contract review team.
A: Here we have given the list of supplier's capability issues to be considered by the contract review…
Q: Problem 1: Construct a Turing Machine for language L₁= (a"be"In 21).
A: The algorithm for planning the turing machine will be: 1. Mark one 'a' to X then move right.2. Mark…
Q: Explain in your own words why big bang testing is inferior to any method of incremental testing…
A:
Q: HRS Ltd is a software house that specializes in human resource management packages sold mainly to…
A: Answer: Step1## Prototype methodology can be reccomended To penetrate into any new area, It will be…
Q: ASAP Solution needed / Solution You're given a string of words. You need to find the word "Nemo",…
A: Input - String Output - String In this problem, we need to design the code in the JS programming…
Q: Show that convolution with a given function f commutes with differentiation; that is, show that…
A: According to the question, we have to show that (f * g)' = f * g'. In step 2, we will show that…
Q: A computer user finds that his wireless router transmits data at a rate of 75 Mbps (megabits per…
A: ANSWER:
Q: Show that convolution with a given function f commutes with differentiation; that is, show that…
A: Show that convolution with a given function f commutes with differentiation that is, show that…
Q: 3. The intensity of radiation of a radioactive substance was measured at half-year intervals. The…
A: SOLUTION:
Q: Solution should be provided in js Programming / ASAP Solution needed (Ctrl) Create a function that…
A: Algorithm - Take input from user. Now use the below logic - function helper(num) { return…
Q: which of the following statement is True java regarding creation script Array Object All of these…
A: All of this
Q: A contract draft review of a properly prepared contract document is expected to yield no negative…
A:
Q: What are some of the ways that defects can be introduced, and why or why won’t a defect result in a…
A: 1. A failure is an error caught by the customer or end-users where the expected and actual behavior…
Q: You are counting points for a basketball game, given the amount of 2-pointers scored and 3-pointers…
A: Algorithm - Take input from user.Now use the below logic -return (2 * twoPointers) + (3 *…
Q: Select one of the high-profile cyberattacks from step 1a and write an analysis of the attack that…
A: A cyber-attack is any hostile move that objectives PC data frameworks, PC organizations,…
Q: Create a function which counts how many lone 1s appear in a given number. Lone means the number…
A: Input - Array Output - array In this problem, we need to design the code in the JS programming…
Q: A software development firm is planning a new airport luggage control project. The system is to…
A: Software quality assurance means the verification and validation of the software project, there are…
Q: HRS Ltd is a software house that specializes in human resource management packages sold mainly to…
A:
Q: "Police Star 1000 System" is the new prestigious software system for recording all the verbal…
A: 1) The system stores a massive amount of recordings. The task of allocating the required voice…
Q: 1. List your arguments in favor of this recommendation.
A: Software inspection is a control technique to ensure that the documentation produced in a particular…
Q: agree, list your arguments. disagree, list your contradictory arguments.
A: Testing is the basic activity aimed at detecting and solving technical issues in the software source…
Q: Create a function which counts how many lone 1s appear in a given number. Lone means the number…
A: Since the programming language is not mentioned, I have done the code using JavaScript.
Q: What type of information are text books good for obtaining
A: Introduction: Textbook: Contains data/information/knowledge Act as a knowledgebase for…
Q: What is Network Linking Devices?explain any three devices with example
A: PCs or other electronic tools can connect to network devices to exchange documents or resources like…
Q: A computer user finds that his wireless router transmits data at a rate of 75 Mbps (megabits per…
A: Average time to transmit one bit is 1.27 * 10^-8 Time taken by signal to reach the phone is 2.67 *…
Q: contain any methods to read / write the data. Only implement the following in the class. This class…
A: #include "linked_list.h" #include <iostream> using namespace std;…
Q: Which of the following models are equivalent to Turing machine (with regards to their expressive…
A: A Turing machine comprises of a limitlessness long tape, which has been split into cells. Every cell…
Q: Q4: For Figure1, explain the difference in the output if you share the object by shx=2, and scale…
A: The question is related to computer graphics.
Q: This class will contain the method necessary to read and parse the .csv file of stock information.…
A: class DateFormatException extends IllegalArgumentException { public DateFormatException(String…
Q: Create a Venn diagrams for each item to visually represent the similarities and differences between…
A: According to the question, we have to explain similarities and differences between centralized and…
Q: David Martin just finished his inspection coordinator course. After obtaining his first appointment,…
A: David Martin just finished his inspection coordinator course. After obtaining his first appointment,…
Q: Write a program that takes an integer list as input and sorts the list into descending order using…
A: BELOW ? STEP BY STEP COMPLETE SOLUTION REGARDING YOUR PROBLEM :
Q: Define a function CalcVal() that takes two integer parameters and returns the sum of the two…
A: #include <iostream>using namespace std; /* Your code goes here */ int main() { int input1,…
Q: ASAP Solution needed / Solution | Given a matrix mtx, implement a function that returns the complete…
A: Algorithm - Take input from user. Now use the below logic - const transposeMatrix = m =>…
Q: Write – 251/256 in binary using 2’s complement in 10 bits.
A: Given number is, 251/256 2's complement binary form means a number is written in the binary form and…
Q: ALPHABET SOUP PROBLEM: Create a function that takes a string and returns a string with its letters n…
A: As per the given question, we need to create a function named alphabet_soup() that returns a string…
Q: Write a C++ program that : You have to do the following question only by nested if-statement. FROM…
A: Write a C++ program that : FROM GRADE A TO F A 93-100% A- 90-92% B+ 87-89% B 83-86% B- 80-82%…
Q: In Chefland there is a competition with N participants (numbered 1 to N). There are N-1N-1 rounds in…
A: Input-Output Details: The first line of input contains a single integer T indicating the number of…
Q: ASAP Solution needed / Solution You're given a string of words. You need to find the word "Nemo",…
A: SOLUTION:
Q: In Chefland there is a competition with N participants (numbered 1 to N). There are N-IN-1 rounds in…
A: Algorithm: The first line of the input contains a single integer TT denoting the number of test…
Q: Q2) Write a program that prompts the user to input two integers: First Integer and SecondInteger…
A: Step-1: StartStep-2: Declare variables FirstInteger, SecondInteger and take inputs from userStep-3:…
Q: Write a function that takes in an array of integers and returns the integers that are either…
A: Algorithm - Take input from user. Now use the below logic - nums.map(function(el){…
Q: Add binary numbers 100111 and 11011 in both decimal and binary forms.
A: We need to add binary numbers 100111 and 11011 in both decimal and binary forms.
Q: One can expect that in many cases, participants in an inspection session are able to suggest…
A: The question is to state the reason for the given statement.
Q: software development rm is planning a new airport luggage cont project. The system is to control…
A: a) This project should be implemented using Agile methodology. Due to the need to develop many…
Q: List the partner and subcontractor participation issues that should be considered by the contract…
A:
Q: "Bengal Tours" is a city center travel agency that specializes in tours and vacations in Canada. The…
A: The travel agency’s staff is expected to use the Tourplanex software package hundreds of times a day…
Q: 1: Rasterize a circle with center (150,100) and radius length equal to 5, then draw a complete…
A: with regard to it regarding to it, A circle with a center of (150 100) and a circle radius of 5. We…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- In your favorite open world adventure video game, currency conversion is as given below: 1 Gold coin 23 Bolts 1 Gem 13 Gold coins Write a program that takes a number of Bolts as user input (as an integer) and converts it to the number of whole Gems, Gold coins, and Bolts as shown below. The conversion information between these measurement metrics is provided in the table above. The number of Bolts should be converted in such a way that maximizes the whole number of Gems and Gold coins. Expected output 1 (bold is user input) Enter the number of Bolts: 32 0 Gems(s) 1 Gold coin(s) 9 Bolt(s) Expected output 2 (bold is user input) Enter the number of Bolts: 3000 10 Gem(s) 0 Gold coin(s) 10 Bolt(s) The file should be named as convertCurrency.cpp. Don’t forget to head over to Coderunner on Canvas and paste your solution in the answer box!Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.A mobile phone service has three different data plans for its customers: PLAN A: For $19.99 per month, 2 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN B: For $59.99 per month, 8 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN C: For $79.99 per month, Unlimited data is provided. Write a program that calculates a customer’s monthly bill. It should input the customer name, which plan was purchased, and how many gigabytes were used. It should then create a bill that includes the input information and the total amount due. It should also display how much money plan A customers would save if they purchased plan B or C, and how much money plan B customers would save if they purchased plan C. If there would be no savings, no message should be printed. Wherever possible, use named constants instead of numbers.
- You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. The price per board foot is given in the following table: The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no integers following it on the line. The program…You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…7) The ideal gas law allows the calculation of volume of a gas given the pressure(P), amount ofthe gas (n), and the temperature (T). The equation is:V = nRT / PSince we only have used integer arithmetic, all numbers will be integer values with nodecimal points. The constant R is 8.314 and will be specified as (8314/1000). This givesthe same result. Implement the idea gas law program where the user is prompted for andenters values for n, T, and P, and V is calculated and printed out. Be careful toimplement an accurate version of this program. Your program should include a properand useful prompt for input, and print the results in a meaningful manner
- i want code in python PrepBuddy And You You and PrepBuddy are standing at the two opposite ends of the line and playing a game. There are NN candies placed in a line. PrepBuddy starts eating candies from left to right and you start from right to left. For each candy, the time needed to finish the candy is given. When the player (PrepBuddy or you) finishes the candy he immediately starts with another. It is not allowed to eat two candies at the same time, to leave the candy unfinished, and to make pauses. If both players start to eat the same bar simultaneously, You leave it to PrepBuddy as a true gentleman. How many candies each of the players will consume. Input format The first line contains a single integer TT - the number of test cases. The first line of each test case contains a single integer NN - the number of cadies. The second line of each test case contains NN - space separated integer T1,T2......TNT1,T2......TN- the time to finish ithith candy. Output format For each test…Please do this in Python Programming and provide Screenshots The output should be exact same like in the examples. If the output in the example is in 2 decimals, then it should be like that. 1d - Electronics The electrics company 'The Battered Battery' is nearly bankrupt. To avoid total disaster, the marketing branch has come up with a special sale to attract more customers. Whenever a customer buys three products, he or she receives a 15% discount on the most expensive product. Write a program that takes the prices of three products as input and prints the discount and final price as output. Remember that the goal of making the assignments in this chapter is to practice the use of if-statements. Therefore, do not use the built-in function max or a sorting function in this assignment. Example: Enter the price of the first article: 200Enter the price of the second article: 50Enter the price of the third article: 25Discount: 30.00Total: 245.00 Put your program in electronics.py3) Suppose an airline company has hired you to write a program for choosing the passengers who should leave an overbooked flight. That means the airline has booked too many passengers hoping some of them would not show up on time, but passengers are on board and the aircraft doesn't have enough seats available for all these passengers. Your program chooses the passenger who must leave the flight. Passengers will be ranked based on the fare they have paid for booking (a double number called fare), and their number of loyalty points (an integer number called points). Fare and points are equally important, that means, in order to decide the position of each passenger in the list, fare and points each have 50% importance. A Person with minimum priority (combination of fare and points) will leave the flight. You need to define a class called Passenger with these member variables: passenger's name • fare points. Passenger class must have 3 accessors, 3 mutators, a constructor with three…
- Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: • The number of days spent in the hospital • The daily rate Hospital medication charges • Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an outpatient: • Charges for hospital services (lab tests, etc.) • Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file, PatientReport.txt. You can use the techniques you learned in Chapter…Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we played in lecture. In this variant, you will ask the user to guess the price of a $42,500 car. Let's assume that the player knows the price of the car is rounded to the nearest $500. If a player's guess is not exactly correct, your program will tell them they are either too high or too low. The player will get as many guesses as they need to guess the price of the $42,500 car. However they will only win the game if they used 5 or fewer guesses. Here are two examples of how the program should work for both cases: Guess the price and win the prize! Enter your guess:50000 Too high! Enter your guess:40000 Too low! Enter your guess:45000 Too high! Enter your guess:42500 You won the car! Guess the price and win the prize! Enter your guess:46000 Too high! Enter your guess:45000 Too high! Enter your guess:44000 Too high! Enter your guess:43000 Too high! Enter your guess:42000 Too low! Enter your…Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story. Ex: If the input is: Eric Chipotle 12 cars. the output is: Eric went to Chipotle to buy 12 different types of cars. 340136.2251206.qx3zay7 LAB 2.31.1: LAB: Mad Lib 0/10 ACTIVITY LabProgram.java Load default template... 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7 8 9 10 11 11 went to + generic Location + to buy + wholeNumber + different types of Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. AAAAA OF ENP 12 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String firstName; String genericLocation; int…