3 Can you please help me: Assume that speed = 10 and miles = 5. What is the value of each of the following expressions?a. speed + 12 – miles * 2b. speed + miles * 3c. (speed + miles) * 3d. speed + speed * miles + milese. (10 – speed) + miles / miles
Q: I ned help programming this C++ program: Write a C++ console application that calculates and…
A: C++ Code: #include <iostream>using namespace std; float calculateCharges(int hours) { //…
Q: Question 3 The VO:Max score of an athletic reflects the physical fitness of an individual. It is the…
A: do while is an exit control loop that checks any condition in the end. It allows at least one…
Q: Write a multiple assignment statement that can be used instead of the followinggroup of assignment…
A: GIVEN: Write a multiple assignment statement that can be used instead of the followinggroup of…
Q: Exercise 2: Ask for a favorite song, favorite movie, and favorite book. Use print statements to ask…
A: Use scanner class methods to accept input from user and nextLine() method is used to read a string…
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: The given c program is to calculate the change. This program prompts the user to enter the value…
Q: You are required to write a code that requests the user to enter four integer numbers that…
A: C++:- c++ is an object-oriented language . Because c++ follows oops property.c++ evolved from c.c++…
Q: def distance(x1, y1, x2, y2): This function will return the distance between two points, given by…
A: Given: We have to write a function def distance that will find distance between two points given by…
Q: _______ are variables available only within the body of a declared function. A. Arguments B. Globals…
A: Arguments : An argument is the value that is sent to the function. Globals : Variables declared…
Q: function completes its task, it does not return (i.e., give back) any information to its calling…
A: Given : The return type ________ indicates that when a function completes its task, it does not…
Q: Item Quantity Item Total 13. Then, Subtotal, Tax, Total Price with "SAR" 1:
A: Java Code: import java.util.*;import java.lang.*;import java.io.*; /* Name of the class has to be…
Q: Discussing the process of methodically going through various approaches to make a Linux machine more…
A: System hardening enhances the security of a Linux mechanism by reducing its assault surface and…
Q: he program should display the message 'Car is due for service' if one of the following is true: •…
A: #include<stdio.h> struct car{ //structure car is declared with plate, mileage, months…
Q: Test Average and Grade Write a program that asks the user to enter five test scores. The program…
A: An algorithm A complete Python Program (including documentation) Output
Q: double 6my_num = 100.0; b- double my_num ='10000'; c- double_myNum = 1000; d- double my num = 100.0;…
A: A variable declaration always contains two components: the type of the variable and its name. Type…
Q: Summary In this lab, you complete a prewritten Java program that calculates an employee's…
A: In this lab, you complete a prewritten Java program that calculates an employee’s productivity bonus…
Q: Usernames An online company needs your help to implement a program that verifies the username…
A: Algorithm of the code:- 1. Create a functioning username. 2. check the length of the username it…
Q: CPSC 130: Introduction to Computer Programming I Program 3: Decisions In this programming…
A: According to the information given:- We have to follow the instruction in order to get desired…
Q: Define the following five functions. 1- printInfo: This function prints your name and ID to the…
A: The given is the programming program where a menu-driven functionality is to be implemented using…
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: The algorithm to calculate the amount of change returned is given below: - Algorithm: - Step1:…
Q: DropLowGrade() – allows a user to drop their lowest grade This function will determine the lowest…
A: Program: test1 = int(input("Enter grade 1: "))test2 = int(input("Enter grade 2: "))test3 =…
Q: True or False When you are working with a value type, you are using a variable that holds a piece of…
A: Explanation: Value type variable holds a value not the memory address of the value stored.the value…
Q: Develop a C# application that allows the user to calculate the fat of his daily food. The user…
A: We need to write a C# code for the given scenario.
Q: • Name this function by your first name (for example, function fadil). • The user should fill all…
A: according to our policy in multi sub part question we are allowed to solve only only one part. text…
Q: mpany name: Bank of Nova Scotia Enter Bank of Nova Scotia's stock symbol: BNS.TO Enter Bank of Nova…
A: Code is below: The code first sets a target yield for valuation (which is 4.0% in this example),…
Q: Car Service Maintenance Create a program for car service maintenance. Based on numbers of months /…
A: Given: Car Service MaintenanceCreate a program for car service maintenance. Based on numbers of…
Q: Function Name: compliments Parameters: answer1 - a boolean (True or False) representing whether the…
A: Solution:The following function displays the outputs as string of compliments.
Q: A value returning function executes its statements and then returns a value. true or false
A: A value-returning function is a function which executes some statements and returns a value usually…
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: What works: Input works if it is in the range of 5 and 95 included 5 and 95. Input works if it is…
Q: my_round(number, integer): Based on the built-in round(...) function. Takes an integer or float and…
A: def my_round(number,integer): x = round(number,integer) return x print(my_round(1234.5678,-2))…
Q: Choose the correct statem (i.e. 01 to 12) and stores it using two integers "kl" and "ko". Next, the…
A: Programs are the set of lines of code that is used to provide instructions to the computer. The…
Q: Summary 2 HouseSign.py - This program calculates prices for cu house signs. In this lab, you…
A: Code: # assigning variables to given values numChar = 8 charge = 0.00 color = 'gold' woodType =…
Q: def area(side1, side2): return side1 * side2 s1 = 12 s2 = 6 Identify the statements that…
A: Here we have a function named area(), which takes 2 input parameters and returns the area. Now, to…
Q: 2: what will be the value of the variable a, ?in the following operations
A: Please find the answer below
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: DWhich is valid C expression? a) int my_num = 100,000; b) int my_num = 100000; c) int my num = 1000;…
A: In this answer I will show the valid C expression among the given options.
Q: FormulaEvaluator.java Requirements: Evaluate the following expression for any value of the variable…
A: 1. Set the example value of x = 5.0 2. Calculate the result of the given equation 3. Convert the…
3 Can you please help me:
Assume that speed = 10 and miles = 5. What is the value of each of the following expressions?
a. speed + 12 – miles * 2
b. speed + miles * 3
c. (speed + miles) * 3
d. speed + speed * miles + miles
e. (10 – speed) + miles / miles
Step by step
Solved in 2 steps
- Code using java programming language.C#Background: Game Rules The rules to the (dice) game of Pig: You will need 2 dice. To Play: a. The players each take turns rolling two die. b. A player scores the sum of the two dice thrown (unless the roll contains a 1): If a single number 1 is thrown on either die, the score for that whole turn is lost (referred to as “Pigged Out”). A 1 on both dice is scored as 25. c. During a single turn, a player may roll the dice as many times as they desire. The score for a single turn is the sum of the individual scores for each dice roll. d. The first player to reach the goal score wins unless a player scores higher subsequently in the same round. Therefore, everyone in the game must have the same number of turns. Execution and User Input This program is quite interactive with the user(s) and will take in the following information; please review the sample input / output sessions for details; we describe them again here emphasizing input. The program will prompt for the number of…
- Needs to be done in C# language. Problem 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• Hospital medication charges• Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an out-patient: • 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 in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges. Input Validation: Do not accept negative numbers for any data.ASSIGNMENT: 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: Pine 0.89 Fir 1.09 Cedar 2.26 Maple 4.50 Oak 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, 4inches 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,…Programming Assignment: Car Repair For this programming assignment, create a car repair program that prompts the user to enter information about a customer, the customer's vehicle, and the work performed on the customer's vehicle. Your program should then display the final car repair bill on the computer screen. Your program should accomplish the following: 1. Prompt the user to enter the following information: a. Information about the customer (name, street address, city, state, zip code, phone number). b. Information about the customer's vehicle (make, model, year). c. Information about the work performed (brief description, labor hours needed, cost of parts). 2. Use a labor cost amount of $100.00 per hour and a sales tax rate of 7.0%. 3. Calculate the following: Variable subtotal sales tax total repair bill amount Formula subtotal = labor cost per hour * number of labor hours sales tax = sales tax rate * subtotal total repair bill amount = subtotal + sales tax 4. A screen shot of a…
- python4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Problem You have code that needs to perform simple time conversions, like days to seconds, hours to minutes, and so on.
- 1. Design and implement an application that reads an integer value representing a year input by the user. The purpose of the program is to determine if the year is a leap year (and therefore has 29 days in February) in the Gregorian calendar. A year is a leap year if it is divisible by 4, unless it is also divisible by 100 but not 400. For example, the year 2003 is not a leap year, but 2004 is. The year 1900 is not a leap year because it is divisible by 100, but the year 2000 is a leap year because even though it is divisible by 100, it is also divisible by 400. Produce an error message for any input value less than 1582 (the year the Gregorian calendar was adopted). 2. Modify the solution to the previous project (i.e., Leap year) so that the user can evaluate multiple years. Allow the user to terminate the program using an appropriate sentinel value. Validate each input value to ensure it is greater than or equal to 1582.Transcribed Image Text Write a program that asks for the principal, the annual interest rate, and the number of times the interest is compounded. It should display a report similar to the following: Interest Rate: 4.25% Times Compounded: 12 Principal: $ 1000.00 Interest: 43.33 Final balance: $ 1043.33C++ Assignment: In India McDonald's has the n number of customers and they are famous for their taste and quality so they plan to Organise the challenge for foody people. What is the challenge is? you have taken a food challenge from the Chef and now you have to eat directly the Y burgers. You will eat as follows: At the first minute you will eat exactly the X burgers and every minute after that you will eat twice the number of burgers you ate the minute before. As you can get tired of food, Chef also lets you take a break from eating for one minute. When you start eating again after a break, your food streaks are reset, which means that in the first minute after the break you will eat X burgers and every minute after that you will eat the burgers you ate twice the last minute. Allow a1, a2, ., let it be your meal length in minutes. The cook needs to have all the ai different in pairs. Get the minimum number of minutes you need to eat Y burgers directly or decide that it is not…