Q1) (A) Write a program to print the value of y 5+x3 x > 4 x = 4 y = {x x < 4 x-10
Q: Student Grade Generator (Toy Problem) Write that prompts the user to input student marks. The input…
A: NOTE: The programming language is not mentioned. So, it is written in Python language. Program…
Q: Problem: Write a recursive function power(x, n), where n is 0 or a postive integer. For example,…
A: Define a function called power that takes two parameters, x and n Check if n is equal to zero If n…
Q: Problem Statement Interest on Credit card accounts can be quite high. Most credit card companies…
A: A required C++ program is as follows, Program: #include <iostream> #include<iomanip>…
Q: hallenge Problem (pyhton) T E S T S C O R E S Write a program that…
A: Program Approach: 1- As mentioned in the assignment created the main function. 2- def keyword used…
Q: 3) Two integers x and y have values of 2 and 3, respectively, and two reals z and f have values of…
A: .not. Logical not .negv. logical not equivalence and. logical and Program: program TESTreal zreal…
Q: Programming language: c++ (1) Prompt the user for a string that contains two strings separated by a…
A: Programming Approach: Including necessary header files. Remove leading and trailing spaces. Splits…
Q: Write a program which continually asks the user for a float until a number between 10 and 12…
A: Since no programming language is mentioned , I have done the code in python. Algorithm : checkFloat…
Q: rogram which return "fizz" if the number is a multiplier of 3, return "buzz" if its multiplier of 5…
A: The function fizz_buzz(num) takes an integer num as input and returns the corresponding FizzBuzz…
Q: stoppingDistance = speed * (2.25 + speed / 21) Write a program which determines whether a vehicle’s…
A: Step-1: Start Step-2: Declare variables speed, dist, stoppingDistance Step-3: Take input for speed…
Q: Write a program to generate a random number between 1 - 100, and then display which quartile the…
A: In this question, we are asked to generate random number and display in which quarter it exist.…
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: Parking Charges) A parking garage charges a $2.00 minimum fee to park for up to threehours and an…
A: Lets see the solution.
Q: Write a program that calculates the time neccessary to completely fill an empty pool with water. We…
A: The algorithm of the code is as follows:- 1. Start2. Ask the user to input the pool dimension…
Q: Functions Exercise (Parking Charges) A parking garage charges a $2.00 minimum fee to park for one…
A: Source Code :-#include <iostream>#include <iomanip> using namespace std; /** * Creating…
Q: Rewrite the following if statement into conditional statement i. if (x > 100) a = 0; elsea = 1; ii.…
A: if (x > 100){a = 0;}else{ a= 1;} if (temp > 45){ population = base * 10;} else{ population =…
Q: Write a complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of…
A: std::setw : Set field width; Sets the field width to be used on output operations. std::setfill :…
Q: This program determines the minimum and maximum of three values inputby // the user and performs…
A: c++ program determines the minimum and maximum of three values input three int values output is…
Q: 5: CheckLetter.cpp) Write a program that adds a check letter to an eight-digit number. The check…
A: Program description : The C++ program, CheckLetter.cpp ask user to enter the 8-digit number .Then…
Q: C++ Programming I Program 4: C++ Craps Game Functions in files, random numbers , stringstream…
A: C++ is a general-purpose programming language. It is an extension of the C programming language with…
Q: 6: forLoops.cpp) a) Print the even numbers between 3 and 43. b) Print every third letter starting…
A: Coded using C++.
Q: 2- Write a pyhton function that prompts the user to input three integers and prints the sum of those…
A: Given: 2- Write a pyhton function that prompts the user to input three integers and prints the sum…
Q: 1: Volume.cpp) Write a program that reads a radius and prints the volume and surface area of the…
A: #include <iostream>using namespace std;int main() { float radius,volume,surface_area;…
Q: Problem: Feed Nibble Monster Till Full Write a program that generates a number in [0, 500] at the…
A: According to the information given:- We have to follow the instruction in order to get desired…
Q: Write code that will read scores of 100 people and pint the min and max score.
A: Arrays are used to store multiple values of one data type into a single variable of that data type.…
Q: def f(x: float) -> int: return int(x) def g(x: str) -> float: return float(x) y = f(g("3.14"))…
A: Answer: Option 3 - y's inferred data type is int Explanation: The given equation is y=f(g("3.14"))…
Q: Write a program that reads from the user a character (ʻq’ or 'c'). If the character is 'c' the progr
A: EXPLANATION First, read the character from the user. Then with help of switch check if it is 'q' or…
Q: Write a machine language program to input two one-digit numbers, add them, and output the one-digit…
A: Lets discuss the solution in the next steps
Q: commas.cpp) Write a program that accepts a 7-9) digit //integer and echoes the number with commas…
A: Given: The need for a problem statement to separate the variations of the last digits and the…
Q: C++ CODE ONLY: Write a program that takes as input five numbers and outputs standard deviation of…
A: Code: #include <iostream>#include<bits/stdc++.h>using namespace std; float mean(int ,…
Q: Q7-Write a program that simulates a simple calculator. It reads two integers and a character. If the…
A: // Always mention the language of the program, for now, I am doing it in C++ // Code #include…
Q: B) =10: th=0:pi/3:2*pi; x=r°cos(th); y=r'sin(th); plot(x.y,'r);hold on X1=x*cos(pi/4)-y'sin(pi/4);…
A: I give the output screenshot of the above code in Matlab
Q: stoppingDistance = speed * (2.25 + speed / 21) Write a program which determines whether a vehicle’s…
A: - We need to determine if the tailgating distance is safe or not.
Q: Q3a) Summary Newton’s law states that the force, F, between two bodies of masses M1 and M2 is given…
A: Note: since programming language is not mentioned we are providing solution in c++. Part a)…
Q: stoppingDistance = speed * (2.25 + speed / 21) Write a program which determines whether a vehicle’s…
A: As the programming language is not mentioned here, we are using JAVA The JAVA code is given below…
Step by step
Solved in 2 steps with 2 images
- Q1. FizzBuzz problem:- Write a program which return "fizz" if the number is a multiplier of 3, return "buzz" if its multiplier of 5 and return "fizzbuzz" if the number is divisible by both 3 and 5. If the number is not divisible by either 3 or 5 then it should just return the number itself? .Exercise 4: Selection and loop statements A certain professor gives 5-point quizzes that are graded on the scale 5-A, 4-B, 3-C, 2-D, 1- F, 0-F. Write a program that accepts a quiz score as an input and prints out the corresponding grade. The input data must be a float numbers and between 0 and 5 Example Input : Quiz score: 3 Output: The grade is C. Exercise 4 Write an improved version of the future value program from Chapter 2. Your program will prompt the user for the amount of the investment, the annualized interest rate, and the number of years of the investment. The program will then output a nicely formatted table that tracks the value of the investment year by year. Your output might look something like this:***Microsoft Visual Studios (C++)*** Write a program that given two coordinate pairs and a third single coordinate will linearly interpolate or extrapolate the third second coordinate. For example, let's say at 50 degrees Celsius the length of a metal rod is 5.4 cm and at 60 degrees Celsius the length is 5.5cm. I can interpolate the length at 53 degrees Celsius by doing 5.4cm + 3*(.1/10)=5.43cm. Your program does not need to continuously run, but should prompt the user for two coordinate pairs, the third first coordinate and return the extrapolated or interpolated third second coordinate.
- 1084 QSearch Write a C++ program, which calculates the area of 6 circles and their total sum. The program should use a loop, which asks the user to input a value for the radius, 6 times (one radius at a time), then calculates the area of each circle, calculates the total sum of these six areas, and finally displays the individual areas and their sum. Note: area = pi"r, where pi-3.14; and r is the radius of a circle. Screenshot Screenshot 2021-08...10.23.40 2021-08...10.11.34 ppVPython 3500) assignments/3090165 Answers to ms to Canvas for the following problems. There should be 7 programs. 4B, 5, 6 1. A. Write a VPython program that creates eight spheres, each placed at one corner of a cube centered on the origin. The length of a side of the cube should be 6 units, and the radius of each sphere should be 0.5. Use at least two different colors for the spheres. B. Add to the program an arrow whose tail is at one corner of the cube and whose tip is at the corner diagonally opposite. The figure below shows the display from one possible solution to this problem. 2. Write a VPython program that represents the x, y, and z axes by three cylinders of different colors. This display from one possible solution is below.6. (Geometry: area of a pentagon) The area of a pentagon can be computed using the following formula (s is the length of a side): Area 5x s² 4 X tan TT 5 Write a program that prompts the user to enter the side of a pentagon and displays the area. Here is a sample run: Enter the side: 5.5 Enter The area of the pentagon is 53.04444136781625
- 9: perfect.cpp) A number is called perfect if the sum of its divisors is equal to the original number. A number is called deficient if the sum of its divisors is less than the original number. A number is called abundant if the sum of its divisors is more than the original number. Write a program that answers the following questions: What numbers below 5000 are perfect? What odd numbers below 5000 are abundant? What are the relative proportions of deficient, abundant, and perfect numbers? 5000 should be in a global constant.Q2/ The value of Y is 1 3 5 Y = - X X³ X5 Xn the following code calculates the value of Y, read the code carefully and program the same idea using the while loop. #include #include int main() { double x,y; int n; cout >x>>n; int i,k; k=0; y=0; for (i=1;iPython Programming Only (PLEASE INCLUDE INPUT VALIDATION IF NEEDED) Write a function named maximum that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if two numbers are one big and one small the function should return the bigger number. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two.(16) 6. You want to write a Java application that creates a while loop that runs until the user enters a 0 as input. Each time the while loop runs, it displays a menu of three choices as will be shown in the sample run below. When the program reads in the user's choice, that choice should be read in as a String called choiceStr. Then, choiceStr should be converted into an int called choice by using the code below: int choice Integer.parseInt(choiceStr); If the user enters a 1 for choice == 1, the program will print "Choice 1" to the screen. If the user enters a 2 for choice == 2, the program will print "Choice 2" to the screen. Here is a sample run: 0 - to quit 1 to print Choice 1 2 to print Choice 2 Enter choice: 1 Choice 1 0 - to quit 1 to print Choice 1 2 to print Choice 2 Enter choice: 1 Choice 1 0 to quit 1 to print Choice 1 2 to print Choice 2 Enter choice: 2 Choice 2 0 - to quit 1 to print Choice 1 2 to print Choice 2 Enter choice: 0function avg and pass x and y Tin printf ("the avg of x and y is %d\n', avgl) give_sqrt (avgl); return 0, float avg (float m, float n) I/ Return the average of n and m void give sqrt (float x) printf ('the sqrt of is Mn'x :/ Print the sqrt value of x. return;C++ - No library functions like atoi Create a machine code program to input two one-digit numbers, add them, and output the one-digit sum. Submit your "machine code" followed by a 'zz.' User Input one: 3 Input two: 4 Output the one-digit sum: 7 zzSEE MORE QUESTIONS