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: Write a program that takes a date as input and outputs the date's season in the northern hemisphere.…
A: Step-1: Start Step-2: Declare variables inputMonth, inputDay and take input from user Step-3: Create…
Q: Write a program that keeps on taking numbers from the user, until the user enters any input that it…
A: Answer: Java Source Code: import java.util.*;import java.lang.*;public class Main { public static…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3 located at…
A: C program: #include <stdio.h>#include<math.h> // function to print distancefloat…
Q: Write a program that simulates rolling a pair of dice. The program should output the value of each…
A: Solution: Note : Program is written in java as you didn't mention any programming language.…
Q: Write a program that reads in hours, minutes, as input, and outputs the time in minutes only.
A: The language i used is C++. I explained the program in comments of the code and also attached the…
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Java Code: import java.util.Scanner; public class LabProgram { public static void…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Given: Write a program that takes a date as input and outputs the date's season. The input is a…
Q: Write a program that prompts the user to input an integer and then outputs both the individual…
A: Program plan: Include the necessary header files. in the main method declare the character array.…
Q: Write a program which takes an input from the user, if the input is 1, calculate the area of the…
A: ALGORITHM:- 1. Display the menu. 2. Take input for choice. 3. Take input for various parameters to…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: /*C++ program that takes a date as input and outputs the date's season*/ #include…
Q: Write a program whose inputs are three integers, and whose output is the largest of the three…
A:
Q: Write a program that simulates flipping a coin twomillions times and displays the number of heads…
A: Program code: //import the required packagesimport java.util.*;//Declare class HeadTailCoinpublic…
Q: Write a program that reads three numbers and prints "all the same" if they are all the same, "all…
A: Please find the answer below :
Q: Write a program which reads two integers and prints out the sum, the difference and the product.…
A:
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Please find the answer below :
Q: Write a Java program that inputs three numbers, finds their sum and average, and displays the result…
A: First we will input the three numbers. Then we will declare two variables "sum" and "avg". Based on…
Q: Write a program that input miles from the user and convert miles into kilometres. One mile is equal…
A: Data types in C++: Some of the basic datatypes of C++ are: int float double char wchar_t bool void
Q: Write a program that works as follows: Enter an integer. The input ends if it is a 0: 1 2 3 -1 0 The…
A: First, we will input the numbers. Then we will find the no. of positive and negative integers. And…
Q: . Write a program if for example, the input: 6 8 2028 prints the date June 8, 2028.
A: Required: Use C# Write a program if for example, the input: 6 8 2028 prints the date June 8, 2028.
Q: Write a program that inputs two positive integers of, at most, 20 digits and outputs the sum of the…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: A set of data from a sample of items is given. (a) The covariance between two random variables X and…
Q: Write a program whose input is two integers. Output the first integer and subsequent increments of 5…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Q: Write a program to read and print 6 temperatures for 6 days and find the average for these degrees…
A: Since programming language was not mentioned , so I used PYTHON-- I have provided PYTHON CODE…
Q: Write a program that converts an input inch(es) into its equivalent centimeters. Take note that one…
A: According to the question we need to write the program that converts an input inch(es) into its…
Q: Write a program that prompts the user to input the elapsed time for an event in seconds. The program…
A: Given: Write a program that prompts the user to input the elapsed time for an event in seconds. The…
Q: Write a program that takes a date as input and outputs the date's season in the northern hemisphere.…
A: Step 1 : Start Step 2 : Input The String from the user as Month and Day using the scanner class.…
Q: Write a program that reads in a farenheit temperature as a decimal number and outputs the equivalent…
A: C++ program to solve the given problem is below. ****As there is no programing language…
Q: Write a program which takes an input from the user, if the input is 1, calculate the area of the…
A: Since you have not mentioned the programming language. I will attempt it in python. if you need this…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Use a dictionary to store the months and number of days in each month Check the month whether in…
Q: Write a program, which takes an input from the user, if the number is between 90 100, Print A Grade,…
A: Since no programming language is mentioned, I am using python Algorithm: 1. Start 2. Take input…
Q: Write a program whose inputs are three integers, and whose output is the smallest of the three…
A: Below is the code in python and output of the question:
Q: prompts the user to input an integer between 1 and 36. If the number is less than or equal to 10,…
A: the code is an given below :
Q: Write a program that exchanges the value of x and y. The output must be: the value of variable y and…
A: Swapping to number using C program #include<stdio.h> int main() { int x, y, temp=0;…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: Program code: //include the required header files #include<iostream> using namespace std;…
Q: Write down a program that will take an English letter as input and will print the next letter in the…
A: Input a character and then add 1 to it and display the updated character
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: Since the programming language is not mentioned in the question, we will answer this question in the…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Please find the answer below :
Q: Write a program that takes an integer number between 0 to 100 as input and outputs one of the…
A: Note :- You have not mention the language of the program , So I am doing your question in C++. Your…
Q: Write a java program to take user input for two numbers and print true if one of them is 50 Or their…
A: Algorithm: Take 2 value form the user then we have to check the first and second value seperately…
Q: Write a program if for example, the input: 6 8 2028 prints the date June 8, 2028.
A: As no programming language is mentioned it is solved using basic C++
Q: Write a program using integers userNum and x as input, and output userNum divided by x four times.…
A: Code: user_num = int(input())x = int(input()) for i in range(3): user_num = user_num // x…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Below is the code in C++ as language not mentioned and sample output:
Q: Write a program that reads a number in feet, converts it to meters, and displays the result. One…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program whose inputs are three integers, and whose outputs are the largest of the three…
A: Python code for above: # function to return largest def largest_number(num1, num2, num3):…
Q: Write a program that converts an input inch(es) into its equivalent centimeters.
A: here in this question we have asked to write a program that convert inches to centimeter.
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Please find the answer below :
Q: Write a program that takes a date as input and outputs the date's season in the northern hemisphere.…
A: month = input ("Input the month (e.g. January, February etc.): ")#Declaration of monthName day = int…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 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…the 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 wireUsing 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 = 81
- 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önderWrite 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 expression
- 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 pointsf. 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.…
- Write 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=6Write a program to get an integer input from the user. If the input is 25, take the length and breadth from the user and calculate the area of rectangle. [ Area of rectangle = length * breadth ] If the input is 40, get the side from the user and calculate the area of square. [ Area of square = side * side ] If the input is 65, get the radius from the user and calculate the area of circle. [ Area of circle = 3.14*r*r] Otherwise Display " Enter number 25 or 40 or 65 ".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…