rite a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for women and men.
Q: What if You Have More than Two Alternatives? For example, given a numerical test score between O and…
A: ALGORITHM:- 1. Take input from the user for the score. 2. Calculate the grade based upon the score.…
Q: Create a program in python wages.py that assumes people are paid double time for hours over 60. They…
A: The required Python code is: import randomimport winsound hourRate=float(input("Enter the hourly…
Q: Write a program in python for the electrical system to find the electrical power using the current…
A: Summary: In this question, we have to take the input from the user of current and voltage and we…
Q: Answer in python language only A very successful cinema director named "Chef" decided to solve the…
A: Coded using Python 3.
Q: Write a Python program that calculates the brightness of a star, given its distance, from the…
A: I have mentioned my code in step 2.
Q: Write a program in java to compute the population of current year,if the population of current year…
A: Program approach - Declare the class. Define the main method. Declare the variables needed for the…
Q: Harry Potter dreams himself in a witchy magic shop, it contains an infinite amount of Golden Snitch.…
A: Algorithm: Firstly take input for the value of two input in the program Then pass those values to…
Q: In a python program where the computer chooses a random number between 1 an d 100 and the player…
A: Since our goal would be to eliminate as more possibilities as we can with each guess, so that we can…
Q: How to compute FInal grade =(Prelimgrade*20%)+(Midtermgrade*20%)+(Pre-Finals*20%)+(Finalgrade*40%)…
A: #Code starts print "\n PRELIM GRADE"Quiz1 = input("Enter Quiz 1 :") #taking input of quizQuiz2 =…
Q: Write a Python program, that determines the solution of the equation by using the False Position…
A: Code is given below :
Q: Create a program using java language that will calculate the average of 4 given grades shown as an…
A: Code public class Main{ public static void main(String[] args) { int…
Q: Write a python program based on the given input and the desired output. Develop a mini calculator…
A: ANSWER: Python Program: Example -1 Output:
Q: Using JAVA solve the below problem Amitabh had a magical cat. That cat once fell down an empty…
A: Below is the detailed and simplified JAVA code for the above listed problem statement: As you have…
Q: Use Python for this question: Craps is a single player dice game, that proceeds as follows:…
A: The python program is given by import random #function to calculate the sum of 2 dies def…
Q: A local store is having a 20% off sale. If taxes for the state are 6%, write a program on python for…
A: Objective: This program reads the customer's name and the original price of an item. Then, it shows…
Q: Ron knows that he will find more time to work hard if he cuts rectangular sheets into squares. So,…
A: Process The first line of the input contains a single integer T. T denoting the number of test…
Q: Write a Python program that will ask the user for his/her weight (in kilograms), then compute and…
A: Python program to compute the weight on the lunar. Prompt the user to enter his/her weight in the…
Q: Consider a ball is kicked at an angle e (in degrees) from the horizontal with an initial velocity vo…
A: [Note: Explanation of the program code is provided within the comments.] Program code:…
Q: Write a Python program that determines a student’s grade. The program will read three types of…
A: Here I have taken input from the user and then stored it into 3 different variables. Next, I have…
Q: Write a program that simulates a fortune cookie. The program should display one of five unique…
A: The solution for the above-given question is given below:
Q: Write a python program to calculate the electricity bill after taking units from user. The units…
A: Required:- Write a python program to calculate the electricity bill after taking units from the…
Q: . Random walkers. Write a program RandomWalkers.java that takes two integer command-line arguments r…
A: public class RandomWalk { public static void main(String[] args) { int n =…
Q: Write a program to find the smallest positive integer that satisfies the following property: If you…
A: source code: n=input("Enter starting value : ")# for user convenience while(True): n=str(n)…
Q: Write a program in Java, Math, Python, Excel or any language of your choices to approximate the…
A: The MATLAB Code for both secant and bisection(it is bisection, not bisector) methods is given below…
Q: Python please: Write a program in which the inputs are three integers and the output is the…
A: here in this question we have asked to write a program which take tree integer input from user and…
Q: d a python program that asks for your street address, then takes that address and tries to find the…
A: It is defined as a powerful general-purpose programming language. It is used in web development,…
Q: We want to write a Python program for n players, which are playing a tournament. In this competition…
A: code : import randomn = int(input("enter number of players: "))for i in range(1,n+1):…
Q: Write a Java program to generate a user's daily average number of walking steps for a given month of…
A: In this question, we are asked to write a java program which calculate the average of walking…
Q: In python In a hotel, there are a number of guests and cleaning staff. There is a conference room…
A: Config file Housekeeper supports a very simple YAML config. The following options are supported: ---…
Q: Write down a complete PYTHON program to do the followings; enter the information of a set of…
A: print("Enter the number of workers: ")numOfWorkers = int(input())#Then we take the hour…
Q: Write a Python program that takes a number and tells if it is a perfect number or not. [The input…
A: Write a program that takes a number and tells if it is perfect number or not.
Q: Write a Python program to read the salary for N employees. Your program should find and print :…
A: Given: Write a Python program to read the salary for N employees. Your program should find and print…
Q: Please answer it in Python Suppose we play a game where each round takes place in the following…
A: We need to write a function points_match that takes as an argument the percentage, the number of…
Q: Please do this in Python Programming Scenario As you probably know, Sudoku is a number-placing…
A: Answer: I have given answered
Q: write in JAVA LANGUAGE Create a program that will compute PRELIM, MID-TERM, PRE-FINAL, FINALS GRADES…
A: Task : Collect the 3 quiz marks in Prelim Midterm Pre-Finals Finals Output the list of grades…
Q: Offer a program that knows how to find the solution of the jackpot price game in a way effective.…
A: Use nested while loop where inner loop is for validation and outer loop is to iterate till computer…
Q: Give the Code in Python and as short as possible and simple to understand To protect people from…
A: Given: We have to give the minimum length of the unused wire, or -1 if the the wire is not…
Q: The chef is a master of the number two game, and the chef wants you to play this game with him as he…
A: Input-Output Explanation: The first line of the input contains a single integer T .T denoting the…
Q: Implement the problem below in Python using mpi4py. Submit the code of your program and a brief…
A: Report: I implemented a parallel n-body solver in Python using the mpi4py library. I generated the…
Q: Write a Python program that asks the user for one number and tells if it is a prime number or not.…
A: num = int(input("Enter the number: "))if num > 1: # Iterate from 2 to n / 2 for i in…
Q: Write a Python program for ....Mr Ramkumar has divided his property into 3 parts in the ratio of…
A: Python program to divide the property into 3 parts. The property division ratio is 13:12:11 The…
Q: The number of people infected with Covid-19 in a country doubles every day. Make a program (in…
A: CODE(PYTHON)-: #Take User Input for current infections and D dayscurrent_infections = int…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: SUMMARY: -Hence, we discussed all the points.
Q: Write an Arduino program that simulates a robot car using: • Two gear motors (DC motors) • One motor…
A: Answer is given below-
Q: Write a Java program that prompts the user to enter a monthly saving amount and displays the account…
A: Approach Use for loop iterating from 1 to 12 for computing account value after each month. The…
Q: The Fibonacci sequence is defined as follows: ϕ0=0, ϕ1=1, ϕn=ϕn−1+ϕn−2. ϕ0=0, ϕ1=1, ϕn=ϕn−1+ϕn−2.…
A:
Q: In PYTHON, what is the order of execution sequence for the following code? The digits at the…
A: Question:
Q: Limurians live on the planet Lemuria where the passage of time is measured in lims (days), limhas…
A: Algorithm of limurian_age.py file : Declare variables according to the number of days lived by…
Q: Give the Code in Python and as short as possible and simple to understand To protect people from…
A: Python code is given below -- this code is short as possible
Q: Write a python program for a pig game that has two players that alternate turns rolling dice. In…
A:
In Python:
The following equations estimate the calories burned when exercising (source):
Women: Calories = ( (Age x 0.074) — (Weight x 0.05741) + (Heart Rate x 0.4472) — 20.4022 ) x Time / 4.184
Men: Calories = ( (Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) — 55.0969 ) x Time / 4.184
Write a
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('Men: {:.2f} calories'.format(calories_man))
Ex: If the input is:
49 155 148 60
Then the output is:
Women: 580.94 calories Men: 891.47 calories
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Need Python Solution Ramesh, Suresh, Mahesh, and Mukesh moved to a new town and searched for accommodations. Now this city is unlike any other city. This city is an apartment matrix and there are no roads. The only way to get around is through houses. If one of the friends passes the apartment once, the party will have to pay its full rent. From the apartment, you can go to the houses to the North, South, East, or West. Since Ramesh, Suresh, Mahesh, and Mukesh are best friends, they want to meet at least once a month. Also, all four are superstitious, so Ramesh goes West only, Suresh goes North only, Mahesh goes East only, and Mukesh goes South only. Any number of people can live in any apartment. The cost of all housing in the city is provided, some of which may be negligible. Negative costs mean that if a friend lives in or moves out of the apartment, the party will be paid an amount equal to the cost dispute. Now the goal of these four friends is to earn enough money to live in the…Loops summary: for vs. while We have now seen that Python has two different loop constructs: the for loop and the while loop. The while loop is more powerful than the for loop, since it can be used in situations where the number of iterations isn't known in advance. For example, the following while loop answers the question: "If a population of bacteria increases in size by 21% every minute, how long does it take for the population size to double?" minutes = 0 population = 1000 growth_rate = 0.21 while population < 2000: population *= (1 + growth_rate) minutes += 1 print (f"{minutes} minutes required.") print (f"Population = {int(population)}") This would not be well suited to a for loop - we are trying to find out how many times the loop will run, and a for loop expects to know how many times it will run before it starts. In contrast, the for loop is a special case of the more general while loop, meaning that any program written with for loops can be rewritten to use while loops.…A fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that a fish is swimming past if:there are four consecutive depth readings which form a strictly increasing sequence (such as 3 4 7 9) (which we will call "Fish Rising"), orthere are four consecutive depth readings which form a strictly decreasing sequence (such as 9 6 5 2) (which we will call "Fish Diving"), orthere are four consecutive depth readings which are identical (which we will call "Constant Depth").All other readings will be considered random noise or debris, which we will call "No Fish."Create a Python program called "fishfinder_firstname_lastname" that takes 1 input of string of 4 numbers separated with comma. Your program must display "Fish Rising", "Fish Diving.", "Fish At Constant Depth" or "No Fish".Example:30,10,20,20 Must display No…
- Computer Science Program in C++ or Java Simple simulation to estimate your likelihood of winning in a game of poker. Assume the game has 6 players. 1. Shuffle the 52 card deck and deal yourself 5 card hand. 2. Using the remaining 47 cards, deal the other 5 players their hands 3. Determine if you would win or lose that hand. Repeat part 2 and 3 500 times. You continue with the same card hand.USING TKinter Please create a Python program based on the game of WAR. The rules of the game are as follows: The game of WAR is rather simple as it requires only the ability to recognize which of two cards has a higher value. In this game the value of cards from lowest to highest is: 2,3,4,5,6,7,8,9,10,J,Q,K,A No suit has a higher value than another. Both players take the top card off of their pile (stack) and place it face up in the playing area. The player that played the higher card wins the round and takes both cards. If there is a tie, then both players place the next card down and the 3rd card up. The winner of the 3rd card wins the round. If the 3rd cards tie, then both players repeat the process until a player has won the hand. When the player runs out of cards, then the player will shuffle the cards from the winning pile (stack). The game will continue until one play player is completely out cards. This program must be in a graphical format.In Python input 1 and input 2’s degree is 4 If input 1 and input 2 have same parents, result return 0 Else if input 1 and input 2 have same grandparents , result return 1 Else if input 1 and input 2 have same great_grandparents , result return 2 Else if input 1 and input 2 have same great_great_grandparents , result return 3 Continue until found they have the same great_great_great…._grandparents, For adding one great, result +1 Else: if no relationship between two input, return -1 tree = [[‘Max’, None , None], [‘Luc’, ‘Max’, None], [‘Lue’, ’Max’, None], [‘Joy’, ‘Luc’, ‘Yoyo’], [‘Eva’, ‘Joy’, ‘Zoe’,], [‘Julie’, ‘Geo’, ‘Eva’], [‘input1’, ‘Brand’, ‘Julie’], [‘Jim’, ‘Lue’, ‘Rae’], [‘Gil’, ‘Jim’, ‘Ree’], [‘Rose’, ‘Gil’, ‘Mandy’] [‘input2’, ‘James’, ‘Rose’] this follow by [people, father, mother] Make the function def degree(input1, input 2, tree)
- language: Python Problem: Write a function log2(x), which gives an integer approximation of the log base 2 of a positive number x, but it does so using recursion. Use a base case where you return 0 if x is 1 or less. In the general case, add 1 to the answer and divide x by 2. On top of writing the function, also write a test case for the function to prove the program works.Submit in python or c++. Error code will downvoted. Every cell (x,y) contains an integer ax,y signifying the course of how the ball will move. ax,y=1 — the ball will move to one side (the following cell is (x,y+1)); ax,y=2 — the ball will move to the base (the following cell is (x+1,y)); ax,y=3 — the ball will move to one side (the following cell is (x,y−1)). Each time a ball leaves a cell (x,y), the integer ax,y will change to 2. Mr. Chanek will drop k balls successively, each beginning from the primary line, and on the c1,c2,… ,ck-th (1≤ci≤m) sections. Decide in which segment each ball will wind up in (position of the ball in the wake of leaving the network). Input :The principal line contains three integers n, m, and k (1≤n,m≤1000, 1≤k≤105) — the size of the framework and the number of balls dropped by Mr. Chanek. The I-th of the following n lines contains m integers ai,1,ai,2,… ,ai,m (1≤ai,j≤3). It will fulfill ai,1≠3 and ai,m≠1. The following line contains k integers c1,c2,……Write a program in C++ to find the Area and Perimeter of a Rectangle. Formula :Area =length * widthperimeter=2*(length+width) Sample Input:Input the length of the rectangle : 10Input the width of the rectangle : 15Sample Output:The area of the rectangle is : 150The perimeter of the rectangle is : 50
- Write a program in C language to simulate tossing a “fair” coin. Allow the user to enter the number of tosses.Print the number of tosses that yield heads and the number of tosses that yield tails.What should be the percentage distribution of heads and tails? (Use the function rand_int)Computer Science Write a Java program that reads a line and a line segment and then determines whether they intersect or not. When they overlap completely, consider that as intersecting. Use variables ((lp1x, lp1y), (lp2x, lp2y)) to represent a line and ((sp1x, sp1y), (sp2x, sp2y)) to represent a line segmentIn Python implement a recursive function named test() that accepts an integer parameter. If the parameter value is even then the test function should divide the parameter value by 2 and return this value. If the parameter value is odd, then the function should return 3 times the parameter value + 1. Then request a user to enter an integer number and recursively call converge() on that number until the function returns the value 1.