grade, based on the marks numbers entered by the user (Using the table below). From To Grade 90 100 A 80 89 B 70 79 C 69 F 0 b. Write an algorithm to determine the average of any six (5) numbers and display the below after: The sum, the product and the average. - c. Describe what is a variable and how is it used in a program.
Q: a. Calculate the PRODUCT and DIVISION of the given two numbers.(For sum:10,25,For difference…
A: Here is Code in Prolog as follows: a. Calculator Note: As your question wasn't clear. SO, i have…
Q: Give the algorithm' to determine the state of water (ice, liquid or steam) within a room base on the…
A: As no language is mentioned, the code is in C language: -
Q: A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10…
A: Step 1:- The algorithm is defined as a set of instructions that is very helpful for design the…
Q: 01: Draw a flowchart for work the traffic lights ? Q2: Write the algorithm required to find the…
A: Q1 flowchart is as given below :
Q: Take user input for a sentence (character by character) and count total number of vowels both…
A: NOTE: SINCE THE LANGUAGE OF THE CODE HAS NOT BEEN MENTIONED, I HAVE USED PYTHON FOR THIS QUESTION…
Q: The company discounted used cars pays their employees according to this chart: 250$ per months plus…
A: given: salary is according to this: 250$ per months plus 50$ per car sold if sales> 10, bonus 5%…
Q: A circular racetrack is composed of four portions: concrete, mud, sand and asphalt. Sly Slick's car…
A: - The question want to know the position of the car according to the time. - We need to code this…
Q: Q/ Lab/Write a program to enter the height and width of flat shape, then check whether this shape is…
A: As per the given problem, we have to write a program to input height and width of a shape and check…
Q: z=0 i-5 x-int(input("Enter any number")) while i< x z=2+i/i+5 print(z) i=i+5 for the above program,…
A: The output of this code is a number. It calculates the expression z= z + i/i+5;
Q: My library > CMPSC 8: Introduction to Computer Science h. > = zyBooks 2.11: LAB: Computing driving…
A: PROGRAM CODE: # take the value of miles per gallonmil = float(input())# take the value of dollars…
Q: The body mass index (BMI) is calculated as a person's weight (in pounds) t 703, divided by the…
A: Note : Since language is not mentioned i used python.
Q: C program The program shall be solved either by using if else ladder or switch only. No marks will…
A: program in c user has to input the name and currency in rials program given an option to convert…
Q: program fo read 10 marks, suppose the student reater than or equal 50, and the average greater .If…
A: I have written the code below:
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: The program is written in C language to find area and volume of sphere.
Q: Home work1: Write an algorithm and draw flow chart to calculate the area of a number of circles with…
A: Algorithm: - Step1: Start Step 2: Declare the variable: float A //to store…
Q: # input Two variables for range lower = int(input("Please enter lower range: ")) upper =…
A: The cyclomatic complexity of this given program is 4. Cyclomatic complexity is a quantitative…
Q: Q2: Draw a flow chart including the algorithm for obtains the Multiplication of 50 even integers…
A: Example 1: Determine and Output Whether Number N is Even or Odd Step 1: Read number N. Step 2: Set…
Q: The volume of a cylinder can be computed by multiplying the area of its circular base by its height.…
A: The answer for the above mentioned question is given below in step 2.
Q: Question No:3 Part: A. Write an algorithm to input three different numbers, and then output the…
A: Algorithim is step wise explanation of a problem. An algorithm must be unambiguous ,has finite steps…
Q: Analyze the below program segment and find the syntax error. /* Tracing The Error*/ cin >> a,b,name;…
A: There are many errors in the code. See below steps.
Q: A bank customer invested $24 in a bank with 5 percent simple interest per year, write a program the…
A: #include<iostream>#include<iomanip> using namespace std;int main(){double…
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A: To write a program for the following to input two real numbers then exchange their values. to…
Q: Question #1. Product in the Range [N...M] Write a Program that reads a starting number (N) and…
A: // C# program to print the product // of all numbers in range N and M using System; class GFG{…
Q: In a program, write the program's algorithm (algorithm like step by step, not code screenshot) that…
A: In a program, write the program's algorithm (algorithm like step by step, not code screenshot) that…
Q: 1. If a=1, b=2, and c=3, what are the values of a, b and c at the end of the following program…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: (B) Draw a flowchart including the algorithm, to find the sum and average of a list including 100…
A: Hello student. Greetings from my side. Hope you are doing great. I will try my best to answer your…
Q: 1. Make a program to display a Series of numbers. Display as follows: Example: 1 5 2 4 3 3 4 2 5 1
A: Introduction: In this question, we are asked to write a series 1 5 2 4 3 3 4 2 5 1 in C program.
Q: In many sports events, contestants are rated by judges with an average score being determined by…
A: PROGRAM INTRODUCTION: Declare and initialize a variable to store the sum of the scores. Start the…
Q: Q1: Let n and m be any positive integers. Write a program to calculate п т T = i=0 j=0
A: The program is written in C Language. Check the program screenshot for the correct indentation.…
Q: The course grades of 75 students from 5 courses are given in the form of a table. Write an algorithm…
A: Step 1 : Start Step 2 : Declare the Arrays to store the Grades and Grade Averages as Integers. Step…
Q: a line of text, replaces all 1. Write a program that inputs punctuation marks with spaces.
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: * Given two integers, the second larger than the first, this program: 1) prints the even numbers…
A: Program description: Java program,ForLoops.java that prompts users to enter two integer values and…
Q: A salesman in XYZ company is selling toothpaste for P89.75 each and tooth powder for P155.95 each.…
A: Include the header files Create a class XYZ and declare the variables sales man name as string ,…
Q: stion 12 Write a program to compute your lucky number from your birthdate that integer values (day…
A: I have written the code below:
Q: Complete a program for counting digits and displaying their total count at the end of the program }
A: Complete code: #include <iostream>using namespace std;int main(){int n;int digits = 0;cin…
Q: Q2: If you knew that the signs should be listed as follows: The universal ratio Brand The ratio…
A: As the programming language is not mentioned here, we are using PYTHON The complete code and output…
Q: The monthly payment for a given loan pays the principal and the interest. The monthly interest is…
A: #Get the loan amount loan_amount=float(input("Loan Amount: ")) #Get the number of years…
Q: Q2: Write an algorithm and draw flowchart for printing odd numbers less than a given number (n).…
A: A number which is not divisible by 2 is an odd number. The total number of odd numbers less then n…
Q: Q1. Write an algorithm and draw a flow chart to calculate the area of triangle and calculate the…
A: Algorithm and flow chart to calculate the area of triangle and calculate the area of rectangle.
Q: Using Python, Many documents use a specific format for a person's name. Write a program whose input…
A: Algorithm and explanation: In the given problem, we can solve it by using string and list concepts.…
Q: The Fibonacci numbers are the sequence below, where the first two numbers are 1, and each number…
A: In the Fibonacci series, the next number is the sum of the first two preceding numbers. The first…
Q: Assuming the level of the Earth’s oceans continues rising at about 3.1 millimeters per year, write a…
A:
Q: Input a range from user and print all the narcissistiC number in that range. Hint: A number is…
A: #include <stdio.h> #include<math.h> int main(){ //declaing variables int…
Q: Q2) Write a program to calculate the average of the semester. To find the average of the semester,…
A: import java.util.*;public class Main{ public static void main(String[] args) { int a=0,b=0,c,d;…
Q: (Converting a given date to the day number in the year) Write a program that prints the day number…
A: Algorithm: Start Store the number of days of a normal year in a list named regYear and number of…
Q: Give the algorithm to determine the state of water (ice, liquid or steam) within a room base on the…
A: Step 1) Start Step 2) Take temperature t as input from user (between 0-300 Fahrenheit) Step 3) Check…
Q: Task 2 Write an algorithm and draw a program flowchart to find the eligibility of admission for a…
A:
Q: A true alphabet has letters for the vowels of a language as well as the consonants. Write a program…
A: logic:- read a character from user. check if input character is vowel or not using if else…
Step by step
Solved in 4 steps
- A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid, the drag force is given by 1 F₁ =pV²ACD Take: p= 1000 kg/m3 is the density of fluid, V 1.25 (m/s) is the swimming speed, A=0.25 m² is the frontal area of the body, Cp=0.09 is the coefficient of drag. MatlapWrite a program to roll 2 dies (use the “rand” function) for 36,000 times and then calculate the number of occurrences of each number (1 to 6) as well as the probability of each number. IN C PROGRAMMING LANGUAGE AND COMMENT EVERY STEP IN DETAILS PLEASEAirline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönder
- 19. The manager of a video rental store wants a program that calculates the amount a customer owes when he or she returns a video. A customer can return only one video at a time. The rental fee is $3.50 for four days. Customers are charged a late fee (currently, $2) per day when the video is returned after the due date. Study the algorithm and desk-check table shown in Figure 2-19, and then answer the questions. a. What will the algorithm display when the user enters 3 as the number of late days? What will it display when the user enters 0 as the number of late days? b. How would you modify the solution and desk-check table to include the total late charge as a processing item? c. How would you modify the solution from Question b to also display the total late charge? Output: amount due Input: number of late days daily late fee Algorithm: 1. enter the number of Late days and daily late fee 2. calculate the amount due by multiplying the number of Late days by the daily late fee, and…2 a. Write a program to using the principle of control structures (if /else statements) determine which of the students grade, based on the marks numbers entered by the user (Using the table below). From То Grade 90 100 80 89 В 70 79 C 69 b. Write an algorithm to determine the average of any six (5) numbers and display the below after: The sum, the product and the average. c. Describe what is a variable and how is it used in a program.The course grades of 75 students from 5 courses are given in the form of a table. Write an algorithm that writes "cannot be entered" for those with an average of less than 40 course grades, and "can be entered" for 40 and above. (Please explain everything the program in details and please check whether the program runs or not by using q-basic64. 01:44
- Write a program to determine whether a year entered through the keyboard is a leap year or not. Also determine whether the year is your year of birth, starting your school, start or end of matriculation (or O-levels etc), start or end of Intermediate education (FSc, A-levels, ICOM, ICS etc) or year of starting your education in COMSATS University?4. A newly opened college ground is rectangular in shape and the Management decides to build a fence around the ground. In order to help the construction workers to build a fence, they planned to place a thick rope around the ground. They also wanted to cover the entire ground with a thick carpet during rainy season. They wanted to buy only the exact quantity of carpet and rope that is needed. They requested your help. Please help them by writing an algorithm and 'C' program to find the exact length of the rope and the exact quantity of carper that is required. Length and width should be a positive number. Input Format: Input consists of 2 integers. The first integer corresponds to the length of the ground and the second integer corresponds to the breadth of the ground. Sample Input and Output: Enter the length of the ground 50 Enter the width of the ground 20 The length of the rope needed is 42 The qu antity of carpet needed is 100o Program fin ished with exit code Presss ENTER exit…Problem: Write a program for computing the amount of money in a bank account at the end of each quarter for a period of one year. A quarter is equivalent to 3 months. Assume that the account is created at the beginning of a year (i.e. January 1). The year will be entered at run time through the keyboard. The account has an initial principal that is entered at run time through the keyboard. No deposit or withdrawal is made within the one-year period. The interest is compounded quarterly which means that the interest earned for the first quarter will form part of the principal for the second quarter, the interest earned for the second quarter will form part of the principal for the third quarter and so on. The annual interest rate is 5%. The interest rate for a quarter is computed by dividing the annual interest rate by 4 since there are four quarters in a year. The computational procedure (see algorithm) and the output of the program (see sample run) are shown below. The output includes…
- 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 anddecreasingPython help... Suppose variable s has been assigned in this way: s = '''It was the best of times, it was the worst of times; it was the age of wisdom, it was the age of foolishness; it was the epoch of belief, it was the epoch of incredulity; it was ... ''' (The beginning of A Tale of Two Cities by Charles Dickens.) Then do the following, in order, each time and show the result (e.g., show assignment statement and result after each): (a) Write a sequence of statements that produce a copy of s, named newS, in which charactersperiod (.), comma (,), semicolon (;), andend of line (\n) have been replaced by blank spaces. (b) Remove leading and trailing blank spaces in newS (and name the new string newS). (c) Make all characters in newS lowercase (and name the new string newS). (d) Compute the number of occurrences in newS of string 'it was'. (e) Change every occurrence of was to is (and name the new string newS). (f) Split newS into a list of words and name the list listSMATLAB The Mach number is a critical quantity in aerodynamics. It is the ratio of the speed of an object (e.g., an aircraft) to the speed of sound. If the Mach number is less than 1, the flow is subsonic; if the Mach number is between (0.8-1.2), the flow is transonic; if the Mach number is equal to 1, the flow is sonic; if the Mach number is between (1.2 and 5), the flow is supersonic; if the Mach number is greater than 5, the flow is hypersonic. Write a script that will prompt the user for the speed of an aircraft and the speed of sound at the aircraft's current altitude and will print whether the condition is subsonic, transonic, sonic, supersonic or hypersonic.