Q1/ Write a program that reads from the user the number of students in the class and their grades in one class, the program must find the largest and the lowest grades with the sequence of students and then find the average grade of the class, see the example below:
Q: In Python write a program to read input a binary string and finds the difference in the count of '0'…
A: Write a program in Python to read input a binary string and find the difference in the count of '0'…
Q: Q4. Write a program to read a number and calculate if it is prime or not?
A: #include <iostream>using namespace std; int main() { int i, n; bool isPrime = true;…
Q: (Convert Celsius to Fahrenheit) Write a program that reads a Celsius degree from the console and…
A: The Answer is in below Steps
Q: (Print distinct numbers) Write a program that reads in ten numbers and displays the number of…
A: The required Java code is: import java.util.Scanner;public class Distinct{ public static void…
Q: 7. Write a program that keeps reading values from the user until the user enters a negative value,…
A: The Answer is in given below steps The code is in c language
Q: Write a program that takes a range from the user and display all the even numbers between the range…
A: Note - Since there is nothing mentioned about the programming language to be used, so this program…
Q: Java
A: Program: //Import necessary packages import java.util.Scanner; //Define a class named Months public…
Q: Write a program that displays every integer between 1 and 100 that is divisible by 5 or 7, but not…
A: Algorithm: 1.Include required header files 2.include main function 3.create a for loop 4.use if…
Q: need help urgent
A: The program starts by asking the user to enter a number n. sqrt() function in "math.h" library is…
Q: Q2: Write a program that inputs a five-digit integer, separates the integer into its individual…
A: Start Input number Continue till number becomes 0 Store last digit in array Divide the number by…
Q: n a program, write the program's algorithm that calculates the sum of odd integers (T1) from 1 to N,…
A: I have provided code in step2
Q: Homework 1. Write a program to have the user guess a number stored in the program. If he guesses…
A: According to the question below the complete program: Programming language is not mention so i am…
Q: Q1: Write a program that determines whether the input year is Leap or Simple, Where the leap year is…
A: //Program of leap year #include <stdio.h>int main() { int y; printf("Enter a year: ");…
Q: 5. A positive whole number n > 2 is prime if no number between 2 and n (inclusive) evenly divides n.…
A: Introduction : Here we have to write a program that accepts a value of n as input and determines if…
Q: Q2)- Write a program to enter a number from the keyboard, then check: -if the number is bigger than…
A: Given: -
Q: 2. Extract Hours and Minutes (with Boilerplates) by Catherine Arellano Write a program that will…
A: This is related to C programming. Note that You haven't provided time.h or main.c hence only I…
Q: What will the following code give? i = 0; while(i<5) i = i-1; end
A: The initial value of i is 0
Q: Q4) Write program, to allow the user to enter the height, and width of any rectangle, and find the…
A: I have answered the question in step 2.
Q: Write EXACTLY what is printed by t
A: Coded using Java language.
Q: 5.17 LAB: Countdown until matching digits Write a program that takes in an integer in the range…
A: Given: To write a code.
Q: 9- Write a program which read a number of 3 digits and check if (units, tens, hundreds) digit is…
A: #include <stdio.h>int main(){ int digit[3],i=0,a=5; // Input the digit as an array…
Q: //////////// //////////// //////////// how do i solve this problem in java. please do not use…
A: Program Instructions:Use scanner class object to get the user input.Use if-else statements to print…
Q: Q1. Write a program that takes your full name as input and displays the abbreviations of the first…
A: As no programming language is mentioned it is solved using basic python
Q: Q3] (1 Write a program to enter a value of x and compute the value of y where x if x 20 -x if x<0 y=
A: x=int(input("Enter x value: "))if x>=0: y=xelse: y=-xprint("The value of y is: ",y)…
Q: 4. Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and…
A: the answer along with code and flowchart and output screenshot is given below
Q: Write a Program to find all Roots of a Quadratic Equation
A: a,b, c are coefficients where x can be calculayed by: x = [-b +- (b^2 - 4ac)^1/2] /2a D = b^2-4ac is…
Q: (Separating Digits in an Integer) Write a program that inputs one five-digit number, sep- arates the…
A: answer is in the 2nd step
Q: 9. Write a program which asks the user for their score on the exam. Display their letter grade based…
A: Ans: Code: grad = input('Grad> ') if grad >= 90 fprintf('A'); elseif grad >= 80…
Q: 10 نقاط Trace the following program showing the values of i, j, and z ?at each step void main() {…
A: Step1: i=0 j=0 j<=4 z=z+(i*j)=0 j++ => j=1 z=0 j++ => j=2 z=0 j++ => j=3 z=0 j++ =>…
Q: Write a program that converts the angle from degree to radian and displays each value.
A: "Since you have asked multiple question,we will solve the first question for you.If you want any…
Q: 1. Write a program that will ask the user to enter a number n and display the numbers from 1 to n on…
A: THIS PROBLEM IS BASED ON MULTIPLE QUESTIONS. ONLY FIRST QUESTION IS SOLVED. KINDLY SEND THE OTHER…
Q: Write program to print all the numbers divisible by 4 and 5 up to a number of
A: Approach For instance, if N = 20 is set as either a restriction, the program must report any values…
Q: Write a program to read a sequence of integers (n), then print the number of the positive and…
A: Required: Write a program to read a sequence of integers (n), then print the number of the positive…
Q: 2.16 LAB: Convert to seconds Write a program that reads in hours, minutes and seconds as input, and…
A: For completing this program, we will follow the subsequent steps: Initializing the Scanner class…
Q: Exercise 1:1 write a program that reads three variables of real type, and then prints in ascending…
A: write a program that reads three variables of real type, and then prints in ascending order.
Q: Q5: Write a program that inputs three integers from the keyboard and prints the sum, average,…
A: EXPLANATION - Create a program . Take three numbers as an input frome user named as num1 , num2,…
Q: Q1\Write a program that sums the numbers between 1 and 9 and finds the sum total
A: Here language is not mentioned so i write c code to sum between 1 to 9: (2+3+4+5+6+7+8)…
Q: (c) You are required to create a program that reads a letter of the alphabet from the user. If the…
A: We want to check if the letter input is vowel or not, for y we have added a check, and printed…
Q: 2. Write a program to read a number. If the number is a multiple of 3, then enter three new numbers…
A: Question 2 is given below
Q: What does the following code segment output? int x= 5; for ( ; ; x++) { if (x < 6) cout<< x << " ";…
A: B. 5
Q: 5- Write a program which read a number consists of 4 digits and find the maximum digit of the…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: Write a program that asks the user to enter an integer and then display the hexadecimal…
A: The program that asks the user to enter an integer and then display the hexadecimal representation…
Q: 5. A positive whole number n > 2 is prime if no number between 2 and Vn (inclusive) evenly divides…
A: A prime number can be denoted as a number that is divisible by 1 and itself. The answer is given in…
Q: Q/Write a program that reads from the user a set of numbers, and first, it has to check how many…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: Q5: Write in Python program: After calculating the ranking score according to the ALES (Academic…
A: ales = float(input("Enter ALES score: "))lang = float(input("Enter the foreign language score:…
Q: 2.Write a program that prompts the user to enter a positive integer and obtains its square root in…
A: The program is written in Java. Please find the source code in the next step.
Q: E2.7 Write a program that prompts the user for a radius and then prints • The area and circumference…
A: We are going to take radius as input from the user and then we will find out area of the circle,…
Q: 5- Write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: Coded using C++.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 2 steps
- Q1/ Write a program that reads from the user the number of students in the class and their grades in one class, the program must find the largest and the lowest grades with the sequence of students and then find the average grade of the class, see the example below: N is the numbers of students in one class X is the grade for each student in the class For example Student # 1 = 89 Student # 2= 60 Student # =80 You must find the largest and the lowest grades with the sequence of the student. The largest grade is 89 the student's number is 1 The lowest grade is 60 the student's number is 2 The average grade of the class is 76.333Q1/Write a program that reads from the user the number of students in the class and their grades in one class, the program must find the largest and the lowest grades with the sequence of students and then find the average grade of the class, see the example below: Nis the numbers of students in one class Xis the grade for each student in the class For example Student #1 = 89 Student # 2= 60 Student 80| You must find the largest and the lowest grades with the sequence of the student. The largest grade is 89 the student's number is 1 The lowest grade is 60 the student's number is 2 The average grade of the class is 76.333CSCI250L Sample Exam 1 Spring 2020-2021 Question1 (50 pts) Write a program that prompts the user to enter the name, the number of children, and the basic salary of an employee. The program will then: Calculate the bonus: bonus = number of children * $25 Calculate the new salary: new salary Apply a tax of 10% and find the paid salary: paid salary = new salary * (1 – tax) %3D salary + bonus The program will then display all the information needed as shown in the sample run below Sample Run: Enter the name of the employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0
- Assignment Write a program that tracks how much steps the user walks in total in a day and reports if the daily target is reached or not. The program will keep reading double values, each representing steps walked during an individual activity within a day (stepsWalked) until either the user enters a negative value or the daily target of 5000 steps is met. If the user enters a negative number, the program should print total steps walked as a double. Otherwise, if the target is exactly reached, the program should simply print "Target is reached", finally if the target is surpassed the program should print the text "Target is surpassed by", followed by the excess amount above the target as a double, and finally printing the text "steps". NOTE: You MUST use a repetitive statement in this question. NOTE: Each stepsWalked value will be given as a non-negative value. You do NOT need to check this. Input Output Answer assignment 3000 1300 500 2305.2 Target is surpassed by 2105.2 steps 450…Exercise I- Medicine Write a program that asks the user to enter the name of the medicine (t for ThroX, f for FeliX), his mass. The user should enter as well if he has a prescription or not. The program will calculate the dosage using: age and his ThroX without prescription -The max dosage should be 0.75 mL -The dosage = mass / 150 -The number of pills per day to take is 1 ThroX with prescription -The dosage =mass * 3 / 150 -The number of pills per day to take is 5 FeliX with prescription -The dosage = 0.77 mL FeliX without prescription -The dosage should be between 0.3 and 0.7 -The dosage = mass * 0.009 -The number of pills per day to take is 2 -The number of pills per day to take is 6 The program should display the dosage and the number of pills to be taken per day if the requirements are full filled, otherwise it display "Please check your doctor for a prescription". In case the medicine does not exist in the database, the program display “Your medicine is not in our database!"…Fibonacci sequence: The first two numbers of the fibonacci sequence are 1 and 1, and sequential numbers are the sum of the previous two. Write a program that prompts the user for an integer n and then prints the first n numbers of the Fibonacci sequence (Please type answer no write by hend)
- Challenge Problem (pyhton) T E S T S C O R E S Write a program that implements a test scores program. Valid test score entries are between 0 and 100 inclusive. The program should display a welcome message and run everything through the "main" function. have the ability to enter several test scores (try a loop) and print out the total score, as well as, the average score. continuously ask for test scores until the number 99.9 has been entered. test for valid entries and the value 99.9. If a test score is valid, the program should add the current score to the total score and update the number of test scores by one (+1), otherwise it displays an error message. Note : This assignment involves the use of a while loop and if-else decision making controls. You CANNOT use the reserved keywords break and continue for any portion of this program or any program for that matter throughout this course.Hailstone sequence Given a positive integer n, the following rules will always create a sequence that ends with 1, called the hailstone sequence: If n is even, divide it by 2 If n is odd, multiply it by 3 and add 1 (i.e. 3n +1) Continue until n is 1 Write a program that reads an integer as input and prints the hailstone sequence starting with the integer entered. Format the output so that ten integers, each separated by a tab character (\t), are printed per line. The output format can be achieved as follows:System.out.print(n + "\t"); Ex: If the input is: 25 the output is: 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 in java17. Math Tutor Write a program that can be used as a math tutor for a young student. The program should display two random numbers to be added, such as 247 +129 The program should then pause while the student works on the problem. When the student is ready to check the answer, he or she can press a key and the program will display the correct solution: 247 +129 376
- Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…Hailstone sequence Given a positive integer n, the following rules will always create a sequence that ends with 1, called the hailstone sequence: If n is even, divide it by 2 If n is odd, multiply it by 3 and add 1 (i.e. 3n +1) Continue until n is 1 Write a program that reads an integer as input and prints the hailstone sequence starting with the integer entered. Format the output so that ten integers, each separated by a tab character (\t), are printed per line. The output format can be achieved as follows:System.out.print(n + "\t"); Ex: If the input is: in javaBirthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints1 ≤ T ≤ 1001 ≤ X, Y ≤ 1031 ≤ Z ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…