Voltage readings are obtained from an electrical substation once every hour for six hours Write a program that 1.display all voltages that differ from the average by more than 10% of the average. 2.display all pairs of consecutive hours where the change from the voltage at one hour to the next is greater than 15% of the average
Q: a program that stores and prints the months of a year:
A: a program that stores and prints the months of a year:
Q: 3. Scientific notation is a way to express numbers that are too large in a more convenient decimal…
A:
Q: 10) Write a program that translates a letter grade into a number grade. Letter grades are A, B, C,…
A: note:- always mention programming language name in question, this is done in python. logic:-…
Q: Write a program to calculate the grade point average (GPA) of a student by getting their grades for…
A: Step 1:- Program Approach:- 1.Include the header file 2.Declare variables 3.Take the input for the…
Q: A weather station provides a couple of daily temperatures (maximum, minimum) (it is not possible for…
A: STEP1: START STEP2: define variables minTemp = 0, maxTemp = 0, days = 0, minSum = 0, maxSum = 0,…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: Note: As no language is mentioned, therefore answering in python Input : Number of students Grade…
Q: Write a program that displays the differences between the first and last, the second and next to…
A: Program description: n is the user input integer variable that stores the number of elements in the…
Q: (Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: In a library catalog, the followings are stored about each book: the author and the title, available…
A: Sol: Algorithms Step1: First of all we have taken input n for count the book Step2 then we have…
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a program to calculate the payment to be paid by user each year and satisfying the…
Q: 2. Write a program that will read a number and will display the factors of the number. Factors are…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: C++ In this task, you are required to write a code that converts an Octal number into its…
A: Choice 1 is followed by inserting an Octal integer and getting its Decimal equivalent value as an…
Q: (b) Given a and b are int variables and c is a double variable. The initial value for a, b, and c…
A: Postfix Operator: value of the variable is first used the expression and its incremented by 1. Since…
Q: Part E Question 1 Part E Question 2 Part E Question 3 Part E Question 4 Part E Question 5 Part E…
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Initialize total to 0…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program: // include required header files #include <iostream> #include <iomanip>…
Q: · Exercise # 1: Wite a program that determines the day number (1 to 366) in a year for a date that…
A: Here, we have to write programs for the above programs.
Q: 4. Write a program that asks the user to enter two positive integers, the height and length of a…
A: The below given Python program will obey the following rubrics: Displaying message to the user to…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both…
A: Program code: //include the required header file #include <iostream> #include…
Q: Write a program that computes the fuel efficiency for a multi-leg journey. The program will first…
A: Code To Copy: #Define the main() function. def main(): #Prompt the user to enter the…
Q: Exercise 1: In this exercise we are asked to write a program that prompts the user for a positive…
A: Input n if(n>0) { while(n>0) { r=n%10; //find remainder…
Q: (b) Below is part of a code, consider this program and show where each part of code is saved in the…
A: Given: Below is the part of a code , Consider this program and show where each part of code is…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: This program is in c language program take input as number of student and grade of each student and…
Q: 8. Write and run a program that reads the user's age and then prints "You are a child." if the age <…
A: As Bartleby guidelines i can solve one question at a time so please post another question again.…
Q: 2. - Write a program that displays the area and perimeter of a rectangle with the width of 5 And…
A: width=5; #initialize widthheight=7.5; #initialize height area=width*height; #calculate area…
Q: write a program in python Write a program that will allow a student to enter their name and then…
A: In order to solve this first we need to initiate count to 0 and the count the correct answers by…
Q: value) Suppose you save $100 each month into a savings account with an annual interest rate of 5%.…
A: Given: value) Suppose you save $100 each month into a savings account with an annual interest rate…
Q: Q4 write a program that accepts a day, month and year then calculate the day of year corresponding…
A: Given requirement, Write a program that accepts a day, month and year then calculate the day of the…
Q: Write a program which input radius of circle and compute area of it. Then input the length of side…
A: EXPLANATION - Create a program . Declare three variable radius , length , area1 , area2 . Take…
Q: Write a program that reads the marks of a student in the test (te), midterm (mid), assignment…
A: I am uploading the handwritten solution in the next step. As there is no programming language…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: i tried like this in java code: java code: public class Test { static double compute(double…
Q: Suppose you are a surveyor. Your job requires you to study some maps that give distances in…
A: Program Plan: Create function kiloToMiles1() to convert kilometer in miles by using pass by value.…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: Here, first you need to declare some variables for all salaries. Then prompt user to enter basic…
Q: 4. Write a simple program that checks the coordinates of a point taken from a user and identifies…
A: Code: //include the required headers #include<iostream> using namespace std; //main method…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades i…
A: Code:Specific language is not mentioned so i am giving the code in c++ langauge: #include…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: C++ program is given below
Q: Write a program that inputs a line of text, replaces all punctuation marks with spaces.
A: Program: //header files #include <iostream> #include <string> using namespace std;…
Q: Variables of type single occupy half the memory of variables of type double, but they have lower…
A: Variables of type single occupy half the memory of variables of type double, but they have lower…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program code: // include required header files #include <iostream> #include <iomanip>…
Q: Write a program that prompt the user to enter the number of students and each student's score, and…
A: #include <iostream>using namespace std; struct student{ char name[50]; float marks;}…
Q: 1. Federal law requires that hourly employees be paid "time-and-a-half" for work in excess of 40…
A: #ask user for hourly wage hourly_wage = float(input('\nEnter hourly wage: ')) #ask user for Number…
Q: Question # 8: Write a program that inputs a number and checks whether it is a perfect number or not.…
A: Answer 8: Objective: The program reads the user input and verifies if the number falls under the…
Q: Exercise : Make a program that takes 5 test scores from the user, calculate the average Score and…
A: According to the Question below the Solution: Output:
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: java code: public class Test { static double compute(double lat1, double lon1,…
Q: • Write a program that computes the average of 5 students grades which are entered by the user.…
A: Please find the answer below :
Q: 7) Write a program that asks the user the number of hours an employee worked and his hourly wage,…
A: code:-- #include <iostream>using namespace std; int main(){ // to store the total_hour and…
Q: Use C++ programming language A customer in a store is purchasing five items. The prices of the…
A: Algorithm: Start Store the price of 5 items in p1,p2,p3,p4 and p5 variables Print p1,p2,p3,p4 and…
Q: 6) Write a program that prompts the user to input a number. The program should then output the…
A: According to the asked question, the solution is given below with a proper explanation.
Q: 5) Write a program that reads three numbers and prints "increasing" if they are in increasing order,…
A: """Program reads three number and prints increasing, decreasing or neitherbased in its values…
Q: (Display a pattern) Write a program that displays the following pattern:JJ aaa v vaaaJ J aa v v a aJ…
A: File name: "Solution.java" public class Solution { public static void main(String[] args)…
Correct and detailed answer please. Thank you!
Step by step
Solved in 5 steps with 2 images
- When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)Summary When you borrow money to buy a house, a car, or for some other purposes, then you typically repay it by making periodic payments. Suppose that the loan amount is L, r is the interest rate per year, m is the number of payments in a year, and the loan is for t years. Suppose that i = (r / m) and r is in decimal. Then the periodic payment is (first image which R=....): You can also calculate the unpaid loan balance after making certain payments. For example, the unpaid balance after making k payments is (second image which L'=....) : where R is the periodic payment. (Note that if the payments are monthly, then m = 12.) Instructions Write a program that prompts the user to input the values of L, r, m, t, and k. The program then outputs the appropriate values. Your program must contain at least two functions, with appropriate parameters, to calculate the periodic payments and the unpaid balance after certain payments. Make the program menu driven and use a loop so that the…Three numbersa. Write a program that reads three numbers and prints “all the same” if they are allthe same, “all different” if they are all different, and “neither” otherwise.b. Write a program that reads three numbers and prints “increasing” if they are inincreasing order, “decreasing” if they are in decreasing order, and “neither”otherwise. Here, “increasing” means “strictly increasing”, with each value largerthan its predecessor. The sequence 3 4 4 would not be considered increasing.c. Repeat part b. but before reading the numbers, ask the user whetherincreasing/decreasing should be “strict” or “lenient”. In lenient mode, thesequence 3 4 4 is increasing and the sequence 4 4 4 is both increasing anddecreasing
- Assignment Write a program that moves a forester unit and a desert corps unit to a given target location and prints the number of hours it took for each unit to reach the target. First, the user will give the starting X and Y positions of the forester unit as well as its base speed (all ints). Then, the starting X and Y positions of the desert corps unit as well as its base speed (all ints). Finally, the target X and Y positions (both ints) and the terrain type (std::string). Speeds are given as distance traveled in one full day (i.e., 24 hours) and is affected by the terrain type using a multiplier over the base speed. Also, after 1 full day, each unit rests for a certain number of hours. Speed multiplier and rest amount of each type of unit depending on the terrain type are as below. Speed Multiplier Rest Duration After 1 day Terrain type Forester Desert Corps Forester Desert Corps Forest 1.3 0.6 4 12 Desert 0.4 1.2 15 6 Hills 0.7 0.8 6 8 Others 1.0 0.8 8 6 After getting all this…For csc 110: Principles of Computer Science Develop an algorithm and program for computing the month-by-month balance in your savings account for 12 months. You can make one transaction – a deposit or a withdrawal - each month. Interest is added to the account at the beginning of each month. The monthly interest rate is the yearly percentage rate divided by 12.Broken Cabins Problem Statement: There is an Office consisting of m cabins enumerated from 1 to m. Each cabin is 1 meter long. Sadly, some cabins are broken and need to be repaired. You have an infinitely long repair tape. You want to cut some pieces from the tape and use them to cover all of the broken cabins. To be precise, a piece of tape of integer length t placed at some positions will cover segments 5,5+1-sit-1. You are allowed to cover non-broken cabins, it is also possible that some pieces of tape will overlap. Time is money, so you want to cut at most k continuous pieces of tape to cover all the broken cabins. What is the minimum total length of these pieces? Input Format The first line contains three integers n,m and k(1sns10°, namsloº, Isksn) - the number of broken cabins, the length of the stick and the maximum number of pieces you can use The second line contains n integers bl,b2,bn (Isbism) - the positions of the broken cabins. These integers are given in increasing…
- Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits. The program should display the day of registration and the starting hour of registration according to the below tables. First 4 digits to the left Registration Day Monday Tuesday WEdnesday 2018 2019 2020 First digit to the right Registration IHour 4 6 10 7-8A rod is used to hang a load (force) of 1000 N.There are 4 ingredients with their respective strengths.Create a program to create a bar diameter table, if using the 4 materials.Example: Copper Steel Material. Aluminum. Bronze Strength(N/mm2) 2000. 1600. 1400. 1700Rod Diameter: Ingredient. Copper Steel. Aluminum. BronzeDiameter. (mm) …. …. …. …..Note: Strength is the maximum stress the material can withstandStress S = force/sectional area S=force/A A = force/SmaxCross-sectional area A = 3.14 x d2 /4 d = root(4xA/3.14)Instructions: Make a list to store the ingredient names and strengths Create in a python programWrite pseudocode to describe an average mark calculator program that computes the average mark for a course. 1. The program prompts the user to enter the following information: a. Request that the user type in the course code.b. Request each student mark be entered one at a time. 2. The program executes continuously (each time prompting for the next student mark) until the user enters a negative number to signal that the marks entry is completed. Note that a negative number is not considered a mark. 3. The program then outputs the following information:a. The course code.b. The average mark for the course.c. The highest mark for the course.d. The lowest mark for the course.4. The program then restarts from (1). 5. To exit the program, the input "stop" is entered in the course code prompt.Declare your variables. *Guide me to solve this question with step-by-step solution. Thank you in advance.
- Exercise 4: Write a program that reads two pieces of information: the hourly wages and the number of hours worked by the employee. The program should then calculate the net salary of the employee and display the results as shown in Figure 4. Note that: the net salary of the employee is the sum of the basic wages (which is number of hours worked times the hourly wages) minus the Social Security fees; where the Social Security fees represent 10% of the Basic wages. Name your program Lab3_Id_ex4.py, where Id is your university Id. Include the design of your solution as comments at the beginning of your program. Test your solution with different input data. Please enter the employee hourly wages? 10 please enter the number of hours worked? 40 Basic Salary Hourly Wages Number of Social Net Salary Hours Security **** 10.000 40.00 400.000 40.000 360.000 **** Figure 4: Exercise 4 Sample RunPlease help with this programA business law class of 25 students takes a midterm exam that has 100 true- or-false questions. The instructor, who is also a computer fanatic, wants to devise a program to obtain a printout with the student's name, score, and letter grade, according to the following schedule: 50 or below F 51 - 55 D 56 – 60 C- 61 - 65 66 – 70 C+ 71 - 75 B- 76 - 80 81 - 85 86 – 90 B B+ А- 91 - 95 A 96 – 100 A+ In addition, the instructor wants to include the total number of students scoring each of the 11 possible grades. How would you use the FORTRAN language to solve his problem?