Phython assignment   Exercise 1: Oreo cookies  Check out the nutritional values of an Oreo cookie (Koppelingen naar een externe site.). Write code that does the following:  calculate how much one Oreo cookie is concerning: calories, sodium, carbohydrate, fat  create a user input that asks how much cookies you ate  calculate how much calories, etc. you consumed  warn the user that if he/she surpasses 2000kcal he/she should stop eating these darn delicious cookies  use variables!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Phython assignment

 

Exercise 1: Oreo cookies 

Check out the nutritional values of an Oreo cookie (Koppelingen naar een externe site.).

Write code that does the following: 

  1. calculate how much one Oreo cookie is concerning: calories, sodium, carbohydrate, fat 
  2. create a user input that asks how much cookies you ate 
  3. calculate how much calories, etc. you consumed 
  4. warn the user that if he/she surpasses 2000kcal he/she should stop eating these darn delicious cookies 
  5. use variables! 
Nutrition Facts
Serving Size 3 cookies
Amount Per Serving
Calories 160
Calories from Fat 58
% Daily Value*
Total Fat 7g
11%
Saturated Fat 2g
10%
Trans Fat Og
Cholesterol Omg
Sodium 190mg
0%
8%
Potassium Omg
0%
Total Carbohydrate 25g
8%
Dietary Fiber 1g
Sugars 14g
Protein 2g
4%
4%
Vitamin C 0%
Iron 10%
Vitamin A 0%
Calcium 0%
Percent Daily Values are based on a 2,000 calorie diet. Your
daily values may be higher or lower depending on your calorie
needs.
Transcribed Image Text:Nutrition Facts Serving Size 3 cookies Amount Per Serving Calories 160 Calories from Fat 58 % Daily Value* Total Fat 7g 11% Saturated Fat 2g 10% Trans Fat Og Cholesterol Omg Sodium 190mg 0% 8% Potassium Omg 0% Total Carbohydrate 25g 8% Dietary Fiber 1g Sugars 14g Protein 2g 4% 4% Vitamin C 0% Iron 10% Vitamin A 0% Calcium 0% Percent Daily Values are based on a 2,000 calorie diet. Your daily values may be higher or lower depending on your calorie needs.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY