Create a functional program that can calculate the displacement and velocity of a free-falling body given the follawing equations of motion, use the constant gravitational acceleration of 32.2 ft/s2 and have the user input the value of initial velocity Vo. The output should show the tabulated results for time t from 0 s to 2 s with a unit step of 0.2s. You may use an additional pre - defined function for this exercise. s = V,t -gt? V = V – gt
Q: Create a python program called code.py. Write a function named divisible() that takes two integer…
A: Python program for above : import random def divisible(num1, num2): # make num1 as min and…
Q: Define a function CalcPyramidVolume with double data type parameters baseLength, baseWidth, and…
A: The volume of a pyramid is the space that a pyramid occupies.
Q: Create a functional program that can calculate the Euclidean distance between 2 points in space…
A: By importing cmath library we can use sqrt() and pow() functions.
Q: Write a function max_magnitude() with two integer input parameters that returns the largest…
A: if(abs(num1)>abs(num2)): return num1 else: return num2
Q: The correct prototype for the following function heading is void F1 (int &p1, double &p2, bool &p3)
A: Function prototype: A function prototype can be defined as a way to state a function that only…
Q: Write a program that outputs inflation rates for two successive years and whether the inflation is…
A: Program code: //include the required header files #include <iostream> using namespace std;…
Q: Write a function that takes a positive integer num and calculates how many dots exist in a…
A: Ok, so the required code is attached below in java and in python3 as the language is not mentioned.…
Q: Write a program that inputs a number for day of the week (e.g. 1 for Monday, 2 for Tuesday, …, 7 for…
A: Note: - As the programming language is not mentioned to write the code. So, I am using the python…
Q: Write complete python program that defines and calls a function isEvenNumber which takes one…
A: Given:
Q: Write a program with total change amount as an integer input that outputs the change using the…
A: Here I have created the function named exact_change(). Inside the function, I have first of all…
Q: Write a program to dispense change in a grocery store. Yay, a coin dispenser machine! The user…
A: Here I written code in C for given problem. I hope you like it.
Q: Create a functional program that can calculate the Euclidean distance between 3 points in space…
A: Calculate the Euclidean distance between 3 points. The distance formula is:…
Q: C++ program
A: Program: #include <iostream> #include <cmath> using namespace std; void…
Q: Write a python program with function called area_circumference_generator that takes a radius of a…
A: Prompt to enter the radius of the circle of float type. Accept the value and store it in a variable.…
Q: Write a program to calculate the position of a projectile at a given time t. For an initial velocity…
A: - We need to highlight the code to find the x and y coordinates using functions. - We are using C++…
Q: Write a program that contains a main function and a custom, void function named show_larger that…
A: Write a program that contains a main function and a custom, void function named show_larger that…
Q: Create a functional program that can calculate the Euclidean distance between 3 points in space…
A: Function main READ variables x1, y1, z1, x2, y2 and z2. CALL function d=distance(x1,y1,z1,x2,y2,z2)…
Q: Write a function that takes a positive integer num and calculates how many dots exist in a…
A: Coded using JavaScript.
Q: Write a program that outputs inflation rates for two successive years and whether the inflation is…
A: Below I have provided C++ Programming. Also, I have attached the screenshot of the code and output…
Q: Create a functional program that can calculate the displacement and velocity of a free-falling body…
A: A C++ program for the given criteria is as follows, File name: “main.cpp” #include <iostream>…
Q: he service charge is $7.00. It costs $0.45 per page for the first ten pages and $0.10 for each…
A: Source code in C++ #include<iostream> //define the…
Q: Write a program with total change amount as an integer input that outputs the change using the…
A:
Q: coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular…
A: Lets see the solution.
Q: Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints…
A: PROGRAM CODE: # start the definition of the function to print feet and inchesdef…
Q: write a C++ calculator program that make calculation of any 2 given numbers
A: I have written a simple C++ program to calculate two operations and then print the output of the…
Q: ROBLEM: Write a program that computes for the Electric Field and Electric Potential at a given point…
A: C++ code to calculate the electric field and electric potential
Q: Create a functional program that can cáalculate the Euclidean distance between 3 points in space…
A: Programming language is missing in the question. So we will answer the given criteria in C++…
Q: Write a program with total change amount as an integer input that outputs the change using the…
A: PROGRAM CODE:…
Q: Write a complete program that uses a function prototyped as: void logN( double x, double &p ); This…
A: Input : Double value in x. Output : log(1+x) from the given user defined function log(1+x) value…
Q: Design a program with extension .c that calculates the final grade of a student with based on: • The…
A: Algorithm: Input three grades from the user Calculate the average of the three grades Input marks…
Q: Write a function max_magnitude() with two integer input parameters that returns the largest…
A: Program: #Import mathimport math#Define max_magnitude()def max_magnitude(user_val1, user_val2):…
Q: Define a function called hypotenuse that calculates the length of the hypotenuse of a right triangle…
A: NOTE: Since programming language is not mentioned. Therefore answering the question In C++ language.…
Q: Write a complete program for the following problem: a. Function findNum() receives a variable named…
A: #include <iostream> using namespace std; void findNum(int num){ if(num%2==0) //if num…
Q: Write a function that takes as a parameter an integer (as a long long value) and returns the number…
A: Program code: //include the required header files #include <iostream> using namespace std;…
Q: Write a program with total change amount as an integer input that outputs the change using the…
A: Here have to determine code to find exact change.
Q: Create a functional program that can calculate the Euclidean distance between 3 points in space…
A: Take the variables for the coordinates. Input the coordinates. Take a variable to store the…
Q: Write a program that reads the values for the width, length, and height of a rectangular box using…
A: ANSWER:-
Q: Write a function that takes a gross salary and calculates the net salary by deducting: • 7.65%…
A: PROGRAM: #include<stdio.h> //Defining the method to calculate the net salary with parameters…
Q: Write a program with total change amount as an integer input that outputs the change using the…
A: Code : # definition of the exact_change() method...def exact_change(user_total): # fetch the…
Q: Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints…
A: According to the information given:- create a function:- print_feet_inch-short() parameters…
Q: Write the definition of a function named quadratic that receives three double parameters a, b, c. If…
A: Program: Programs are used to interact with the computer systems. A program is a piece of code that…
Q: Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1,…
A: Q: Write function for given definition. (language: python)
Q: Create a functional program that can calculate the Euclidean distance between 3 points in space…
A: Program code: //include the required header files #include <bits/stdc++.h> #include…
Q: Write a function that takes the current date and corrects the number of days, if it's wrong. The…
A: Actually, function is a group of statements.
Q: Write a Python program using functions that WIll ask the user for a humber, then based on tne…
A: program code: '''def main(): #toread input a=input("input number:")…
Q: Create a functional program that can calculate the displacement and velocity of a free-falling body…
A: Program: #include <iostream> #include <cmath> using namespace std; void…
Q: Write a function that takes one argument, an integer, and returns the value of the following 1117…
A: Below I have provided a python program for the given question. Also, I have attached a screenshot of…
Q: Write a program that reads the values for the width, length, and height of a rectangular box using…
A: Note: Programming language is missing in the question. So we will answer this program in C. If you…
Q: Create a functional program that can calculate the displacement and velocity of a free-falling body…
A: Below is the implementation of the function calc(float v0) which calculates the velocity and…
*C++
*Include pseudocodes as well (in form of comments)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program in python that prints a pyramid made of letters in the middle of the screen. Use functions with parameters for this assignment. The base width of the pyramid is determined by a character the user enters. If the user enters the letter o, the following pyramid will be printed. It can be assumed that the screen width is 80 characters. a aba abcba abcdcba abcdedcba abcdefedcba abcdefgfedcba abcdefghgfedcba…Write a C++ temperature conversion program which does the following: Write a function called toCelsiusByReference, which takes a parameter temperature by reference, and returns a bool: bool toCelsiusByReference(float &temperature) It should do two things: change the parameter temperature from Fahrenheit to the equivalent Celsius temperature return true if the parameter was was above freezing (>32 F), return false if freezing or below. Demonstrate that the function works by writing a main() function that asks the user to input any Fahrenheit temperature, calling the function to convert, and then printing out the celsius temperature. Also, use the bool returned from the function to print out a message saying if it's above freezing or not. Your cout statements must all be in main(), they must not be in your function. Your output should look something like this: Welcome to the temperature converter!Please enter a temperature in Fahrenheit: 60The equivalent Celsius is:…Write a program that calculates the area (a) of a triangle given two values b (base) and h (height) and using the formula area = (base * height) / 2 .The program should include a function called calculate_area which has two input parameters(b and h) and one output parameter (a).The user is prompted to enter two input values that will be used as base (b) and height (h) thenthe function calculate_area uses those two values as input parameters returns the calculatedarea (a) as an output parameter. After using the function calculate_area the program shoulddisplay the calculated area (a).Hint: use a pointer for the output paramete
- Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are x1,x2,x3,x4,andx5, then the mean is x=(x1+x2+x3+x4+x5)/5 and the standard deviation is: s=(x1x)2+(x2x)2+(x3x)2+(x4x2)+(x5x2)5 Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation.(Program) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters, such as zerocount, onecount, twocount, and so forth, to 0. Then generate a large number of pseudorandom integers between 0 and 9. Each time 0 occurs, increment zerocount; when 1 occurs, increment onecount; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of time they occurred.Design a program with extension .c that calculates the final grade of a student withbased on:• The grade of 3 exams that are averaged and whose value is 80% of the gradefinal.• The grade of a final exam whose value is 15%• The qualification of a final work whose value is 5%Use the appropriate mathematical function to round the final grade to the nearest integer.
- Write a c++ program that takes a date in the following format: December 24th, 2021 and extracts the day, month, and year as 3 integers. Your program should have the following functions: (a) WriteafunctiongetDatethatpromptsausertoenteradateasastringandreturns it. (b) Write a function extract that takes as its parameter a date and returns the day, month, and year as 3 integers. (c) Write a function convertDigits that takes as its parameter a string of digits and converts it to an int. (d) Write a function convertMonths that takes as its parameter a month as a string and returns a corresponding number from 1 to 12 (1 for January, . . . , 12 for Decem- ber).Write a c++ program that takes a date in the following format: December 24th, 2021 and extracts the day, month, and year as 3 integers. Your program should have the following functions: (a) WriteafunctiongetDatethatpromptsausertoenteradateasastringandreturns it. (b) Write a function extract that takes as its parameter a date and returns the day, month, and year as 3 integers.use the function isdigit(c) that returns true if c is a digit character and false if otherwise. (c) Write a function convertDigits that takes as its parameter a string of digits and converts it to an int.(to convert a digit character to a digit number use static_cast<Int> ('D') - static_cast<Int>('0') where d is 0,1,...,9) (d) Write a function convertMonths that takes as its parameter a month as a string and returns a corresponding number from 1 to 12 (1 for January, . . . , 12 for Decem- ber).Write program in python with a function occupy(n), which shows how birds are going to occupy n nests, assuming that each new bird will choose the nest in the middle of the largest unoccupied run of nests. For example, if there were 10 nests, occupy(10) would print out the following sequence, where underscore indicates an unoccupied nest, and X indicates an occupied nest. The first line of the printout is just 10 underscores showing that all the nests are unoccupied. The second line shows that a bird came to nest in position 5, since that is one the first middle positions of the unoccupied run from 0 to 9. In the third line a bird came to occupy the middle position for the longest open run of nests, from 0 to index 4.
- Please answer it in Python Write a function division_arrondi that takes as an argument a numerator, a denominator, and as optional arguments a rounded Boolean (worth False by default) and a decimal integer (valid 0 by default) and that calculates the value of the numerator/denominator fraction (unless the denominator is zero, in which case your function will display an error message and return nothing). If the rounded Boolean is False, the function will return this result without rounding it (if decimales is specified during the call, it will be ignored). If the rounded Boolean is True, the result will be rounded to the requested number of decimal places (by default, to the nearest integer). To make your rounds, you will use round(nombre_a_arrondir, nombre_de_decimales). Examples:division_arrondi(1,3) is 0.333333333333333333division_arrondi(1,3,rounded=True, decimales=2) is 0.33division_arrondi(15,8) is 1,875division_arrondi(15,8, rounded=True, decimales=2) is 1.88…Please answer it in Python Write a function division_arrondi that takes as an argument a numerator, a denominator, and as optional arguments a rounded Boolean (worth False by default) and a decimal integer (valid 0 by default) and that calculates the value of the numerator/denominator fraction (unless the denominator is zero, in which case your function will display an error message and return nothing). If the rounded Boolean is False, the function will return this result without rounding it (if decimales is specified during the call, it will be ignored). If the rounded Boolean is True, the result will be rounded to the requested number of decimal places (by default, to the nearest integer). To make your rounds, you will use round(nombre_a_arrondir, nombre_de_decimales). Examples:division_arrondi(1,3) is 0.333333333333333333 division_arrondi(1,3,rounded=True, decimales=2) is 0.33 division_arrondi(15,8) is 1,875 division_arrondi(15,8, True) is 2 division_arrondi(15,8, rounded=True,…Write a simple JavaScript program to calculate the average mark and to calculate the grade of a student. Pass the rest parameter prefixed with three dots (...) as an argument to implement the function calculateAverageMark() - calculateAverageMark(...args)Calculate the average mark of the student and return it. Then, this average is used to determine the corresponding grade. Return the output with 2 decimal places. Implement the calculateStudentGrade() function to calculate the student grade based on the average mark.The average mark returned by the function calculateAverageMark() is passed as argument to this function.The grades are computed as follows: Range Grade <50 F <60 D <70 C <80 B <90 A <100 O Note: You may verify the correctness of your function by invoking it from within console.log as shown in sample input and output Sample Input and Output:Sample Input1:console.log(calculateAverageMark(80, 77, 88, 95,…