Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON- no 'i' statements Use a for loop (with range) with an accumulator to calculate a persons weight at the end of the month for

PYTHON- no 'i' statements

Use a for loop (with range) with an accumulator to calculate a persons weight at the end of the month for five months assuming that their diet reduces calorie intake by 500 calories per day. The typical weight loss is four pounds per month. The program should prompt the user to enter their current weight. Use int for the data type and create appropriate prompts for the input statements. Enter 150 pounds for the test data. Copy code and output.

Output should be this:

What is your starting weight? 150

At the end of the month 1 your weight will be 146 lbs.

At the end of the month 2 your weight will be 142 lbs.

At the end of the month 3 your weight will be 138 lbs.

At the end of the month 4 your weight will be 134 lbs.

At the end of the month 5 your weight will be 130 lbs.

>>>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions