2. Write a program to calculate time one will take to climb top of statue using stair given, there are total 100 stairs and it take one second to climb one stair if one get jump of 'N' stair on reaching 'N' th stair if 'N' is prime number.
Q: Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x…
A: Program code: //include the required header files#include <iostream>#include…
Q: Write a program that works out if a given year is a leap year This is how to workout whether if a…
A: The complete Javascript code is given below with code and output screenshot
Q: Write a numpy program to find the first Sunday I'm current month and current year
A: Required:- Write a NumPy program to find the first Sunday in the current month and current year.…
Q: 3. Write an Algorithm and draw a flow chart based on the following, Calculate the area of circle and…
A: Actually, algorithm is an step by step process.
Q: Create a height comparator program which takes input name and height of two users and in output…
A: Take input Name and height of both users using input() function. Compare the heights of both users…
Q: There are four different points on a plane, P(xp,yp), Q(xq, yq), R(xr, yr) and S(xs, ys). Write a…
A: Checking if four points given are making lines AB and CD are orthogonal on the plane or not in…
Q: Write a program to read and print 6 temperatures for 6 days and find the average for these degrees…
A:
Q: 4)Write program that input the user age and print the sentence: a) You are child if the age is less…
A: There is not mentioned any programming language so I used JAVA Step 1 : Declare a variable age and…
Q: Write a program XXXYYY13 to calculate the surface area (S) and volume of cylinder (V) if you knowthe…
A: As the language of program is not mentioned the program is done using the C++ language. Following is…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A: Flowchart:
Q: 2. Write an Algorithm and draw a flow chart based on the following, Calculate the area of circle and…
A:
Q: 2. Consider the formula for a ball to reach the height ye on its way up (t1) and on its way down…
A: Declare the variable v and get the input initial upward velocity from the user Declare the variable…
Q: 3. Write an algorithm and flowchart to find out the sum of the following series upto n terms: 1 +…
A: Start Input n Initialize sum to 0 Initialize term to 1 I from 1 to n Add term to sum Update term…
Q: Write a program to calculate velocity of a car when distance and time are given by the user.
A: C Programming: C programming is a procedural language that was developed in Bell Laboratories by…
Q: Consider the formula for a ball to reach the height yc on its way up (tl) and on its way down (t2).…
A: Program v0 = 5g = 9.81yc = 0.2import matht1 = (v0 - math.sqrt(v0**2 - 2*g*yc))/gt2 = (v0 +…
Q: Develop a program that 1- Would read an input from the keyboard. The input should be a whole…
A: while True: #1- Would read an input from the keyboard. The input should be a whole positive…
Q: 2. Write a complete program following the algorithm given below. 2.1 Print a message to ask user to…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //ask…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A:
Q: Q3. a) Write a program to find the resultant (R) of two forces F1 & F2 with angle 0 between them as:…
A: #include<bits/stdc++.h> using namespace std; int main(){ int f1,f2; cin>>f1>>f2;…
Q: Q6/A: Draw the flow chart for a program that reads, calculates, and prints any temperature? B: Draw…
A: algorithm:- Input n temperature from user. calculating:- total sum value and then calculating…
Q: In order to discourage excess electric consumption, an electrical company charges its customers a…
A: Step 1 : Start Step 2 : Take input for the Electricity consumed in Kilowatt-hours from the user.…
Q: Write a program that recommends the number of calories a person should eat each day. Calories are…
A: Program to find the calories required for a person in a day. Recommend the required calories based…
Q: Write a program that finds the day of the week for any given date using Zeller’s congruence. Zeller…
A: Objective: In the solution of the problem, first we read the date then check if the month is 1 or 2…
Q: 1. Make a program to accept two integers X and Y, then compute the difference. If X-Y is Negative,…
A: The Answer is
Q: 3) Write an algorithm for a program that inputs the of grades of an arbitrary number of students and…
A: 1) Algorthm that inputs the grades of arbitary number of students and output highes grade Declare…
Q: 1. What will the following program print out: >>> x - 15 >>> x- x +5 print(*) >>> a. 20 b. 15 с. 5…
A: As given, we need to find out the output of the following code - x = 15 x = x + 5 print(x)
Q: Write a complete program that will read two integer values. Your program should compute and display…
A: as you have not specify any language so I give the code in Python along with outout and code…
Q: 3- Given S= 1 + 3! 5! ,correct the following program which describes the series S,. 7! 9! S=2; m=1;…
A: Error in the above program: Variable S's initial value should be 1 instead of 2. f = f*i will…
Q: This program accepts the height of a person in centimeter and categorise the person according * .to…
A: A. 1-ElseIf((p >= 150) And (p < 165)) Then 2-ElseIf((p >= 165) And (p <= 195)) Then…
Q: Q13: Write a program to read X and print Sin X if X>0, square root X f X<0 and absolute X if X/2 is…
A:
Q: 4. Draw a flowchart for the following algorithm: When two points in time are compared, each given as…
A: flowchart is a graphical presentation which shows flow of controls and execution of statements.
Q: 2. Write a program that will determine whether a person is a child, a teen-ager or an adult that a…
A: Answer:- I have use the if, else if statement for this program to check the age of child, Adult and…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: I am giving most answers as per the Q/A expert community recommendation because the main question…
Q: The formula for the computation of the volume of cylinder is V = Tr?h. Write a program that will…
A: Algorithm to find the volume of the cylinderStep1: Set the constant Pi=3.1415Step2: Declare…
Q: Q3/ Suppose a movie theater has 36 seats, laid out in a rectangular six rows by six seats. Let the…
A: C programming
Q: Write a program that works out if a given year is a leap year This is how to workout whether if a…
A: Code: function leapYear_697(year){ return (year % 100 === 0) ? (year % 400 === 0) : (year % 4 ===…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A: Given c++ program
Q: Q4:// Write a program to calculate the volume of one Mole of an ideal gas as a function of pressure…
A: Here have to determine program for calculate volume of mole gas.
Q: → Example 11: Write down an algorithm and draw a flowchart to find and print the largest of N (N can…
A: Algorithm: Step 1:Input N, Current Step 2: Max = Current Step 3: Counter =1 Step…
Q: Modif
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to print…
Q: Write a complete IDENTIFICATION program which calculates the
A: ANSWER: Program
Q: Write a C1500 program that will check if your student number is even (i.e. it is divisible by 2).…
A: #include <stdio.h> int main() { // define student number intstudent_number = 123456789;…
Q: Write a program that computes the following equation: 1 2 y = 1++ x2 п + - ...
A: Given that, Write a program that computes the following equation: y = 1+1x+2x2+3x3+....+nxn
Q: B: Draw the flowchart of a program that find the following:- y=x+12 when x>0 when x<0 y=m +x y=x+25…
A: Flowchart: Flowchart is pictorial representation of steps/process of solving a problem
Q: 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: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: 2. Write a complete program following the algorithm given below. 2.1 Print a message to ask user to…
A: Here no language is mentioned so I have given code in python below based on algorithm.
Q: Write a program that prompts for and reads the radius and the height of a cylinder (in centimeters).…
A: Programming instructions: Include necessary header files. In the main(), prompt the user to enter…
Q: Task 12 Write a Python program which takes a number and prints the digits from the unit place, then…
A: Program description: n is the user input integer variable that stores the value of the number.…
Q: Q3/ Suppose a movie theater has 36 seats, laid out in a rectangular six rows by six seats. Let the…
A: Step-1: Start Step-2: Declare an array theater of size 6 * 6 and initialize with {1,1,1,1,1,1},…
Q: 3) Write a program to find a. Surface area (A= 2 r n) b. volume(v=r ² a h) of a cylinder using…
A: Algorithm: Step-1: Start Step-2: Take input radius and height from the user. Step-3: Calling…
Step by step
Solved in 2 steps with 2 images
- Write a program that reads an unspecified number of scores anddetermines how many scores are above or equal to the average, and how manyscores are below the average. Enter a negative number to signify the end of theinput. Assume the maximum number of scores is 100.C++ Write a program that flips a fair coin N times. It should calculate the number of times every sequence of consecutive heads appears the sequence of N coin flips. Suppose the result of flipping the coin 10 times is HTHTTHHTTT then a sequence of 1 consecutive heads appears 2 times; a sequence of 2 consecutive heads appears 1 time. Note N is an arbitrarily large number.Finish the function below that takes in the length of the two parallel sides of a trapezoid a and b, which are separated by a distance h, and returns its area. In [ ]: defarea_of_trapezoid(a,b,h):# YOUR CODE HEREraiseNotImplementedError() In [ ]: """Check that area_of_triangle returns the correct output for several inputs""" assert abs(area_of_trapezoid(3,3, 5) - 15) <=.1 assert abs(area_of_trapezoid(3,4, 5) - 17.5)
- Write a program that reads in a series of integer numbers, and determines how manypositive odd numbers are among them. Numbers are read until a negative integer is given.Use cycle and exit.Write a program that works out if a given year is a leap year This is how to workout whether if a perticular year is a leap year on every year that is evenly divisible by 100 except every year that is evenly divisible by 100 unless the year is also evenly divisible by 400 Note Study the flow chart given below START No Yesit cleanly divisible by Not Leap No Yes it cleanly divisible by 1007 Leap No Yes it cleanly divisible by 4007 Not Leap Leap Guideline : Create a unique code Create a function leapYear_697 to accept the parameter (i.e year ) and return whether the given year is a leap year Javascript program name should be like Assign2 697A circus is designing a tower routine consisting of people standing atop one another'sshoulders. For practical and aesthetic reasons, each person must be both shorter and lighter thanthe person below him or her. Given the heights and weights of each person in the circus, write amethod to compute the largest possible number of people in such a tower.
- Q3) Write a program which input radius of circle and compute area of it. Then input the length of side of square and compute area of it, Then Print the largest area. Cirele Area = 0.5 R*3.14 Square Area = the length of side 4Write a program that finds the day of the week for any given date using Zeller’s congruence. Zeller found the following formula to calculate the day of the week using the day of the month, the month, and the year. weekday = (day + 26 * (month + 1) / 10 + year + year / 4 − year /100 + year /400 ) % 7; The formula is based on the following: There are seven days in the week so the calculation must be done modulo 7. The first term, day, shows that each day of the month moves the weekday forward by 1. The second term, 26 * (month + 1) / 10, is the Zeller congruence. Instead of worrying about the number of days in each month, Zeller devised this solution. Zeller’s formula works for a solar system when the year starts from March, not January. Therefore, we must consider the months January and February as months13 and 14 of the previous year. In other words, January of 2017 must be considered as month 13 of year 2016. The next term, year, moves the week day one day for each year because…A right triangle can have sides that are all integers. The set of three integer values for the sides of a right triangle is called a Pythagorean triple. These three sides must satisfy the relationship that the sum of the squares of two of the sides is equal to the square of the hypotenuse. Write a program to find all Pythagorean triples for side1, side2, and the hypotenuse all no larger than 30. Use a triple-nested for loop that simply tries all possibilities. Using Files in c programming language and comment all your steps please
- Write a Numpy Program to calculate the mean of the number of steps of the first crossing time which is 30 steps from the start point in 100timeswrite a program to obtain temperature (W) that found from:* please hurry thanks alotWrite a program to calculate the surface area and volume of a square pyramid. A square pyramid has a base that is square and all triangle faces are congruent isosceles triangles. (An isosceles triangle is a triangle in which two of the sides are equal. Length of the base: a Height of the pyramid: h Volume = a2h/3 Slant height, s = sqrt(h2 + (a/2)2) This is the Pythagorean Theorem part. Area of one pyramid side = s*a/2 For this program you are to determine two things about a square pyramid. 1) the surface area of the four sides. 2) the volume. Do not include surface area of the base. Test case 1: Height: 5.0' Base: 2.5' Test case 2: Height 2.5 Base: 4.3' The program asks the user to enter the pyramid height (in feet) and length of the base (in feet). Your program will need to determine surface area, and volume by using pythagorean theorem. Your output should neatly show the height, base, total surface area, and volume of the pyramid using 33 decimal place of…