Write a program FitnessPlanner 1 that asks the user to enter his/her weight in lbs, how many chicken nuggets were eaten, average walk speed in mph (typically 3 mph, which is a 20-minute mile pace), and average run speed in mph (typically 6 mph, which is a 10-minute mile pace). The program should then output how long the user needs to walk and how long the user needs to run in order to burn those chicken nuggets off. Declare the calories of a chicken nugget as a global constant This Fitness Planner program will calculate how long you need to exercise to burn off what you just ate What is your weight in pounds? 125 How many chicken nuggets did you eat? 20 What is your average WALKING speed in mph (3 is typical, a 20-min/mi pace) ? 3 a 10-min/mi pace) ? What is your average RUNNING speed in mph (6 is typical, 7 You need to walk for 287 minutes to burn off the 20 chicken nuggets you ate You need to run for 81 minutes to burn off the 20 chicken nuggets you ate Make a copy of the previous program and rename the class to FitnessPlanner, 2. This time, before asking the user to enter a walking or running speed, ask the user if he/she prefers walking or running by asking the user to input "W" for walking or "R" for running. You then should only ask the user to enter the walking speed OR the running speed according to the user's response to this query. Likewise, use the appropriate formula (for walking or for running). When you read the letters w/W or r/R from the user, save them as strings. The method to read a string is next() Example: Scanner keyboard new Scanner (System.in) System.out.println ("Enter your gender: ") String gender keyboard.next () ; This Fitness Planner program will calculate how long you need to exercise to burn off what you just ate What is your weight in pounds? 150 How many chicken nuggets did you eat? 12 Do you prefer walking or running (W or R)? W a 20-min/mi pace) ? What is your average WALKING speed in mph (3 is typical, 2 You need to walk for 187 minutes to burn off the 12 chicken nuggets you ate.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

How do i solve this problem in python? ( has 3 steps) 

Write a program FitnessPlanner 1 that asks the user to enter his/her weight in lbs, how many chicken
nuggets were eaten, average walk speed in mph (typically 3 mph, which is a 20-minute mile pace), and average
run speed in mph (typically 6 mph, which is a 10-minute mile pace). The program should then output how long
the user needs to walk and how long the user needs to run in order to burn those chicken nuggets off.
Declare the calories of a chicken nugget as a global constant
This Fitness Planner program will calculate how long
you need to exercise to burn off what you just ate
What is your weight in pounds?
125
How many chicken nuggets did you eat?
20
What is your average WALKING speed in mph (3 is typical, a 20-min/mi pace) ?
3
a 10-min/mi pace) ?
What is your average RUNNING speed in mph (6 is typical,
7
You need to walk for 287 minutes to burn off the 20 chicken nuggets you ate
You need to run for 81 minutes to burn off the 20 chicken nuggets you ate
Transcribed Image Text:Write a program FitnessPlanner 1 that asks the user to enter his/her weight in lbs, how many chicken nuggets were eaten, average walk speed in mph (typically 3 mph, which is a 20-minute mile pace), and average run speed in mph (typically 6 mph, which is a 10-minute mile pace). The program should then output how long the user needs to walk and how long the user needs to run in order to burn those chicken nuggets off. Declare the calories of a chicken nugget as a global constant This Fitness Planner program will calculate how long you need to exercise to burn off what you just ate What is your weight in pounds? 125 How many chicken nuggets did you eat? 20 What is your average WALKING speed in mph (3 is typical, a 20-min/mi pace) ? 3 a 10-min/mi pace) ? What is your average RUNNING speed in mph (6 is typical, 7 You need to walk for 287 minutes to burn off the 20 chicken nuggets you ate You need to run for 81 minutes to burn off the 20 chicken nuggets you ate
Make a copy of the previous program and rename the class to FitnessPlanner, 2. This time, before
asking the user to enter a walking or running speed, ask the user if he/she prefers walking or running by asking
the user to input "W" for walking or "R" for running. You then should only ask the user to enter the walking
speed OR the running speed according to the user's response to this query. Likewise, use the appropriate
formula (for walking or for running).
When you read the letters w/W or r/R from the user, save them as strings. The method to read a string is next()
Example:
Scanner keyboard new Scanner (System.in)
System.out.println ("Enter your gender: ")
String gender
keyboard.next () ;
This Fitness Planner program will calculate how long
you need to exercise to burn off what you just ate
What is your weight in pounds?
150
How many chicken nuggets did you eat?
12
Do you prefer walking or running (W or R)?
W
a 20-min/mi pace) ?
What is your average WALKING speed in mph (3 is typical,
2
You need to walk for 187 minutes to burn off the 12 chicken nuggets you ate.
Transcribed Image Text:Make a copy of the previous program and rename the class to FitnessPlanner, 2. This time, before asking the user to enter a walking or running speed, ask the user if he/she prefers walking or running by asking the user to input "W" for walking or "R" for running. You then should only ask the user to enter the walking speed OR the running speed according to the user's response to this query. Likewise, use the appropriate formula (for walking or for running). When you read the letters w/W or r/R from the user, save them as strings. The method to read a string is next() Example: Scanner keyboard new Scanner (System.in) System.out.println ("Enter your gender: ") String gender keyboard.next () ; This Fitness Planner program will calculate how long you need to exercise to burn off what you just ate What is your weight in pounds? 150 How many chicken nuggets did you eat? 12 Do you prefer walking or running (W or R)? W a 20-min/mi pace) ? What is your average WALKING speed in mph (3 is typical, 2 You need to walk for 187 minutes to burn off the 12 chicken nuggets you ate.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 7 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education