Create a python code that calculates which asks what amount of cake in grams from the user. Then the code calculates the sugar which is 1 / 6 of it, and chocolate which is 1 / 3 of it, and flour which is 1/2  of it   DO NOT USE: %.1f  should look like this: Amount of Grams in cake (G): 200 #Then calculates: Sugar required: 33.3 G Chocolate required: 66.7  G Flour required: 100 G

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 8PE
icon
Related questions
icon
Concept explainers
Question

Create a python code that calculates which asks what amount of cake in grams from the user. Then the code calculates the sugar which is 1 / 6 of it, and chocolate which is 1 / 3 of it, and flour which is 1/2  of it  

DO NOT USE: %.1f 

should look like this:


Amount of Grams in cake (G): 200

#Then calculates:

Sugar required: 33.3 G

Chocolate required: 66.7  G

Flour required: 100 G

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Operators
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,