4. Write a program that computes the following equation: 1 2 y = 1+ - + - ... .2 xn
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere…
A: Volume of a Sphere = 4/3*π*r³Area of a Sphere = 4*π*r²
Q: rite a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time…
A: Program approach: Input age, weight, heartRate, and time. Compute women calories calories_woman…
Q: Write a Program to calculate the electromagnetic force between two electrons placed (in vacuum) at a…
A: As the programming language is not mentioned as per our policy i am solving this question in python…
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: turbo c++ program of Grass sod costs 35.00 per square meter and fencing costs 100.00 a linear foot.…
A: Include Header files Declare the Double variables L,W,p,SC,FC, meter, tot,sod=35.00 and…
Q: What will be the output of the below program: x=5 y=2 z=x+y print("x*y=",z)
A: We are given a code where we are going to find the output. NOTE: Whatever we write inside print…
Q: 3. For three resistors connected in series, the total resistance is the sum of the individual…
A: Given: Resistors are connected parallel Therefore Total resistance is Total Resistance =…
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: Write a program to enter a value of x and compute the value of y where x if x ≥0 -x if x < 0 y =
A: #include <stdio.h>int main(){ int x,y; printf("Enter value of x: ");…
Q: Write a program to calculate the following equation cos(x) 2+x* ly? – x|
A: Start. Read the input. Perform the operations using the calculations given. Print the output. Exit.
Q: What will be the output of the below program: x=5 y=2 z=X+y print("x/y=",z)
A: Here, Code is given.
Q: Write a program to calculate the following equation cos(x) 2 * x * + ly? – x|
A: Given: We have to write a program to calculate the following equation. You have not mentioned…
Q: Write a program that prompts the user to input coefficients A, B, and C of a quadratic equation in…
A: The nature of roots depends on the value of discriminant So first calculate the discriminant and…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4…
A: The following step calculates the area and volume of a sphere with a given radius r. To find area of…
Q: write a program to calculate cube of a number, the cube
A: calculate the cube and then print the cube of that number using function: The following code shown…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4…
A: Given: The program is written in C language to find area and volume of sphere.
Q: Write a program, which: inputs 50 numbers outputs how many of the numbers were > 100 langiage C#
A: #include <stdio.h> int main(){ int x, i, sum=0; x=0; int A[50]; printf("Input 50…
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: Design a program that will compute the product of all integers that are divisible by 5.
A: Algorithm: Start Read number of values i.e n Initialize prod to 1 If n>0, read a number m and…
Q: Write a program that outputs prime numbers. This program should work as follows:
A: here in the given question ask for a program as per question statement.
Q: What is the value of x if m-4 and b=12? def mystery(m, b): y = 71 x = (y - b) / m return x…
A: Required: Output of the given python program
Q: Write a program that computes for the Electric Field and Electric Potential at a given point in a…
A: There are three possible conditions and use if-else if ladder to compare the values of d and r
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 program to calculate the total cost of the vehicle by adding basic cost with: i.excise…
A:
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: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Though the question did not specify the programming language, the program has been developed using…
Q: 2. Evaluate the following expressions for m = 6, n=2 b= 0, c = 0, d = 0, and e = 0 (i) a+=4+ ++m*n:…
A: After evaluation: (i) m=7 n=2 a=18 b=0 c=0 d=0 e=0 (ii) m=5 n=2 a=0 b=0 c=0 d=0 e=0…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Step1 : inputs age (in years), weight (in pounds), heart rate (in beats per minute), and time…
Q: Q1}Depend on the value of the variable w, write program that calculate the following: 1 y = + Vx…
A: A mathematical expression can be evaluated using mathematical operators and functions. Regular…
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: • Write a program that computes the average of 5 students grades which are entered by the user.
A: According to the guidelines we are supposed to answer only 1 question. So I am solving the first…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Program: #definition of main function if __name__ == '__main__': #get the inputs data =…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Scl. -The area of sphere 4…
A: Given: The program is written in C language to find area and volume of sphere.
Q: What will be the output of the below program: x=6 y=2 z=x*y
A: As per code syntax , it is written in python language.
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4…
A: Given: The program is written in C language to find area and volume of sphere.
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: Modif
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to print…
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: 5. Write a program that finds the sum of the following equation: :أكتب برنامج يقوم بإيجاد المجموع ل…
A: Name of programming language is not given above problem statement hence we are going to use c++…
Q: 1- Write a program to compute the value of y: y =+ 3 n Where %3D ... x2 x3
A: #include<iostream> #include<math.h> using namespace std; int main(){ int x,n;…
Q: 4- Write a Program to calculate the electromagnetic force between two electrons placed (in vacuum)…
A: Given: Charge of an electron q = 1.6*10-19C Distance between the electrons = 2*10-13 m K= 9*109 The…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: A sphere is a three dimensional object that is rounded in shape. The sphere is defined in three axes…
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: The following equations estimate the calories burned when exercising (source): Women: Calories (…
A: Required:
Q: Write a program that computes the rent in five years and the total rent for one year starting five…
A: Input Rent for a month and Calculate Rent for 5 years and also display rent per year
Q: Print a big 'F':(static) ###### # # ##### # # #
A: Begin Create a function that prints multiple hashes- 5 hashes Create a function that prints a single…
Q: 2. Write a program to calculate time one will take to climb top of statue using stair given, there…
A: C++ code :-
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 1 images
- Suppose you want to deposit a certain amount of money into a savings account with a fixed annual interest rate. We are interested in calculating the amount needed to deposit in order to have, for instance, $5000 in the account after three years. The initial deposit amount can be obtained using the following formula:. Write a program that generates and prints 50 random integers, each between 3 and 6. .Write a program that generates a random number, x, between 1 and 50, a random number y between 2 and 5, and computes x". .Write a program that generates a random number between 1 and 10 and prints your name that many times. .Write a program that generates a random decimal number between 1 and 10 with two decimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00.You can approximate e using the following summation: Write a program that displays the e value for i = 10000, 20000, …, and 100000.
- Example6: If AL=55 , BL=AA Find the result of the following program - AND AL,BL OR AL,BL XOR AL,BLSuppose two line segments intersect. The two endpoints for the first line segment are (x1, y1) and (x2, y2) and for the second line segment are (x3, y3) and (x4, y4). Write a program that prompts the user to enter these four endpoints and displays the intersecting point. As discussed in Programming Exercise 3.250, the intersecting point can be found by solving a linear equation. Use the LinearEquation class in Programming Exercise 9.11 to solve this equation.4. Write a Phyton program that computes the speed of sound (a) in air of a given temperature T (°F ). Use the formula 5T+2297 2457 a = 10861
- 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. MatlapGive an example of program that calculate the following sum:Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we played in lecture. In this variant, you will ask the user to guess the price of a $42,500 car. Let's assume that the player knows the price of the car is rounded to the nearest $500. If a player's guess is not exactly correct, your program will tell them they are either too high or too low. The player will get as many guesses as they need to guess the price of the $42,500 car. However they will only win the game if they used 5 or fewer guesses. Here are two examples of how the program should work for both cases: Guess the price and win the prize! Enter your guess:50000 Too high! Enter your guess:40000 Too low! Enter your guess:45000 Too high! Enter your guess:42500 You won the car! Guess the price and win the prize! Enter your guess:46000 Too high! Enter your guess:45000 Too high! Enter your guess:44000 Too high! Enter your guess:43000 Too high! Enter your guess:42000 Too low! Enter your…
- Airline 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önderf. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…The manager of Mama Calari’s Pizza Palace wants a program that calculates and displays the number of pizza slices into which a circular pizza can be divided. The manager will enter the radius of the entire pizza. For this exercise, use 14.13 as the area of a pizza slice, and use 3.14 as the value of pi. Desk-check your solution’s algorithm using 10 as the pizza’s radius; then desk-check it using 8. (Hint: For the first desk-check, the number of pizza slices should be a little over 22.)