Instructions An object's momentum is its mass multiplied by its velocity. Write a program that accepts an object's mass (in kilograms) and velocity (in meters per second) as inputs, and then outputs its momentum. Below is an example of the progam input and output: Mass: 5 Velocity: 2.5 The object's momentum is 12.5
Q: Draw a structured flowchart or write pseudocode that describes the process of guessing a number…
A: The problem is related to guessing the number that will be generated randomly by the program. The…
Q: Write a C program to calculate the area of a circle when the diameter is given. Identify and display…
A: start input diameter of circle calculate radius calculate area=3.15*r*r if area>50 then circle is…
Q: Python Code: Many people keep time using a 24-hour clock (11 is 11 AM and 23 is 11 PM, 0 is…
A: given: Many people keep time using a 24-hour clock (11 is 11 AM and 23 is 11 PM, 0 is midnight). If…
Q: A program tests an input temperature and display corresponding output based on the following…
A: Test an input temperature and display corresponding output.
Q: SAMPLE OUTPUT: A Simple Calculator Program Enter an expression: 4 + 5 Answer: 9 Try Again? [Y/N]: y…
A: Python: Python is a high level, object oriented programming language. Python uses indentation…
Q: Design a program that computes pay for employees. Allow a user to continuously input employees'…
A:
Q: What is required is to write a calculator program that calculates the operations of the square root,…
A: C++ program for Calculator: #include<iostream> #include<math.h> using namespace std; int…
Q: Python Programming The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, . ... Each number in the…
A: Fibonacci Numbers : The Fibonacci numbers are the numbers in the following integer sequence : 0 , 1…
Q: Write a program that inputs year and month number, it then display the number of days in that month…
A: The given problem is to be solved in programming language where the user will input the year and…
Q: The program takes the masses of two objects and the distance between them to determine the…
A: The program takes the masses of two objects and the distance between them to determine the…
Q: 1. Write an Algorithm and Flowchart for the following Ask the user to give input coordinates (x, y)…
A: #include < stdio.h > #include < math.h > int main() { float cx, cy,…
Q: b. Convert the Raptor flowchart to a complete Java program. Start "Input the first number:" GET numl…
A: Step 1: Prompt and accept the first number. Step 2: Prompt and accept the second number. Step 3:…
Q: Write the pseudocode on a piece of paper and explain your answer. 1. Write the pseudocode to…
A: Required: Write the pseudocode on a piece of paper and explain your answer. 1. Write the pseudocode…
Q: SAMPLE INPUT/OUTPUT Write a Java program that will ask the user for the number of rooms (including…
A: The program is written in Java import java.util.*;import java.text.*;public class Main{ public…
Q: *Code in Python* Write a program that takes as input a number of kilometers and prints the…
A: k = float(input("Enter the number of kilometers: "))#1 km = 0.539957 nautical milesnm = k *…
Q: Suppose you deposit $50 in a bank account every month for a year. Every month after the deposit has…
A: I give the code in Matlab as per your requirement along with output and code screenshot
Q: Design a program that will determine how much money you need each month to pay for keeping the car •…
A: The given problem is to be solved in two phases: 1) Creation of flowchart for solution 2)…
Q: In physics, an object that is in motion is said to have kinetic energy. The foll formula can be used…
A: - We need to highlight the code for the required calculation. - We are using C++ here.
Q: 4. Write a Phyton program that computes the speed of sound (a) in air of a given temperature T(°F).…
A: Declare the variable T and Get the Integer input from the user Declare the variable num and…
Q: Samantha and Vikas are looking to buy a house in a new development. After looking at various models,…
A: Programming language is missing in the question. So we will answer this program in C++ language. If…
Q: Write a pseudocode that directs a cashier how to give change. The program has two inputs: the amount…
A: - The question wants to have the code for the currency exchange program.
Q: Write the algorithm and a program that prompts the user to input the masses of the bodies and the…
A: 1. Input the masses of the two bodies and the distance between them. 2. Calculate the force between…
Q: Quiz 2 Draw a flowchart and write a java program that asks the user to enter his\ her grade. The…
A: Program Approach: Importing necessary package Defining the main class Defining the main method…
Q: Write and test a program that computes the area of a circle. Request a number representing a radius…
A: Code: in c++ as no coding language is mentioned: #include <iostream> using namespace std; int…
Q: Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time…
A: Note: As no language is mentioned, therefore answering the given question in python. Input : age…
Q: Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and…
A: you does not mention programming language so we are giving solution in C++
Q: Design and write a Python program that gives and grades a math quiz. The quiz will give 2 problems…
A: Code:- import randomscore=0for x in range(2): n = random.randint(1,20) m =…
Q: C program based on the algorithm below Welcome to the temperature conversion program. Please…
A: PROGRAM: //Header files #include <string.h> #include <stdio.h> //Defining the main int…
Q: if characters ‘Y’, ‘R’ and ‘B’ represents the primary colors Yellow, Red and Blue; this algorithm…
A: if characters ‘Y’, ‘R’ and ‘B’ represents the primary colors Yellow, Red and Blue; this algorithm…
Q: Review Loops Write a java program to ask three people three questions about name, number of courses,…
A: import java.util.Scanner; //Importing Scanner class to take input from the userpublic class Main…
Q: A room has one door, two windows, and a built-in bookshelf and it needs to be painted. Suppose that…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: 1. Write a program that converts miles to feet. If the distance is more than 15,000 feet, tell the…
A: C program to solve the given problem is below.
Q: You decide to buy some stocks for a certain price and then sell them at another price. Write a…
A: Write a program that determines whether or not the transaction was profitable. If your transaction…
Q: flowchart of Many treadmills output the speed of the treadmill in miles per hour (mph) on the…
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Read value in mph…
Q: Five Star Retro Video rents VHS tapes and DVDs to the same connoisseurs who like to buy LP record…
A: Take input of number of new and old videos, compute total price and display. New video price $3.00/…
Q: Write a Little Computer Man program that determines if the number entered by a user is an odd or…
A: Process: A number is even if it is perfectly divisible by 2. When the number is divided by 2, we use…
Q: "A program is designed to calculate the tax to be paid. The program takes the salary as an input in…
A: Solution:-- 1)As it has been given in the question that a program is designed to calculate…
Q: Write a program that converts numbers to words.
A: EXPLANATION - Firstly take input from user a number . Store it into a variable . Create while loop…
Q: A palindrome is a word or a phrase that is the same when read both forward and backward. Examples…
A: Python program to check whether the given word is palindrome or not In a function, first, compare…
Q: Instruction: Write a Java program and make a drawing of the flowchart (make sure to use proper…
A: PROGRAM EXPLANATION: Import the scanner class. Create the main class. Define the main method.…
Q: Input in a number representing a car type, until the number 0 is input. There are three types of…
A: Here we need to write pseudo code. Pseudo code is like code which doesn't need to be error free. It…
Q: The flight of a model rocket can be modeled as follows. During the first 0.15 s the rocket is…
A: Given: Mass of the rocket: Not given, so, I have taken 0.1 Propulsion during the first 0.15s is: 16N…
Q: Write the program that computes an employees pay. The program should input the number of hours…
A: As there is no programming language mentioned so question is attempted in python language In…
Q: 1. For this problem, you are going to design a game for the children to teach them about numbers.…
A: Approach is to take input to number in an infinite loop and when user inputs an even number break…
Q: Write a program that prompts the user to input their names and age and then displays your name and…
A: I have given an answer in step 2.
Q: The following program prints out several numbers. What is the first and what is the last number it…
A: Find the first and last number in the output after execution of the given python program. number =…
Q: speed=input("Enter your speed in mph: ") speed = int(speed) distance = input("Enter your distance in…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: C ++ Demonstration: Write a program that prompts the user to input three positive angle values in…
A: I have provided C++ CODE along with CODE SCREENSHOT and 4 OUTPUT SCREENSHOTS-------------
Q: esign Pseudocode for a program that outputs every number from 1 through 15, the values times 10 and…
A: The given problem is related to algorithm and solving the problem using an algoritham. The program…
Python coding
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- 1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the user to enter a number from 1-6 and the corresponding hangman should be printed. The value the user inputs corresponds to the number of incorrect guesses in a real hangman game and so the completeness of the hangman will correspond to the number of ‘incorrect guesses’ inputted by the user (e.g., if the user enters 1, then only the head of the hangman will be printed; full example below). Example:Enter a number from 1-6: 1O Enter a number from 1-6: 2O|Enter a number from 1-6: 3O\||Enter a number from 1-6: 4O\|/|Enter a number from 1-6: 5O\|/|/Enter a number from 1-6: 6O\|/|/ \ 2. Modify your program from problem 1 so that the user input is checked to be a validsingle digit (1-6) before printing the corresponding hangman. If the input is not valid, theninstead of a hangman the following message should be printed “Invalid input: you must enter asingle number from 1-6.” Example:Enter a…Using Paython Write a program that asks a student for his grade (out of 100) in 3 exams and then print out his final grade (out of 100), given that the weight of the first exam is 30%, the second 30%, and the third 40%.Example Input:Exam1: 70Exam2: 80Exam3: 90Example Output:Total Grade = 81Explanation: 0.3 * 70 + 0.3 * 80 + 0.4 * 90 = 81the electrical resistance r (in ohms) of a metal wire is given by the formula r = (ml)/ a where m is the resistivity of the metal; l is the lenght of the wire in feer, and a is the cross-sectional area of the wire ( in the circular mils) write a program that allow user to input for l and a for a copper whose resistivity m of copper is 10.4. Calculte the resistance of a wire
- 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 = 10861Airline 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.…
- You have been asked to write a program to play rock-paper-scissors. Your program will ask the user to input a number 0, 1, or 2 to denote rock, paper, and scissors respectively. Your program will then randomly generate a number 0, 1, or 2 to denote the computer’s hand. The rules for the game are: •A scissor can cut paper. •A rock can knock a scissor. •A piece of paper can wrap a rock. Let the game run continuously until either the user or the computer wins 3 times, displaying the outcome of each hand. At the end of the game, display a message indicating whether the user or the computer wins Helpful Hint: import random player2= random.randint(0, 2)Write a program that takes as input the speed of a car e.g 80. If the speed is less than 70, it should print “Ok”. Otherwise, for every 5 km/s above the speed limit (70), it should give the driver one demerit point and print the total number of demerit pointsWrite a program that inputs a number and checks whether it is a perfect number or not. A perfect number is the number that is numerically equal to the sum of its divisors. For example, 6 is a perfect number because the divisors of 6 are 1, 2, 3 and 1+2+3=6
- A mass m is attached to the end of a rope of length r 3 meters. The rope can only be whirled around at speeds of 1, 10, 20, or 40 meters per second. The rope can with stand a maximum tension of T = 60 Newtons. Write a program where the user enters the value of the mass m, and the program determines the greatest speed at which it can be whirled without breaking the rope. Assume that the mass m is less than 100 kg. Hint: T = mv2 /r. Drop Your Code here: #Set the rope length #Set the maximum tension #Set the message #Read the mass value #Set a list of possible rotation speed #Set the size of the list Drag your statements from the following choices: length = 3 max_tension = 60 message = "The greatest speed without breaking the rope is:" mass = float(input(">>>Enters the value of the mass m: ")) rotation_speed - [1. 10, 20, 40] N= len(rotation_speed) pos - N-1 for i in range (N): tension = mass"rotation_speed[i)*2/length if tension>max tension: pos i-1 break…Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3located at points (1, 2, 3), (3, −4, −5), and (−4, 2, −6) respectively. The units are coulombs forcharge and meters for coordinates. The energy is given by the expressionWrite a program that computes the theoretical flame temperature when a mixture of methane, propane, n-butane, and n-pentane (0% to 100& methane in 5% increments; 0 to 100 mol% propane in 5% increments; 0% to 100% mole n-butane in 5% increments) at 25°C is burned with excess air (0% to 100% excess in 5% increments) preheated to preheated to (50°C to 200°C in 10°C increments)