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    should look like this: Amount of Grams in cake (G): 10 #Then calculates: sugar required: 1.6666666666666665 G chocolate required: 3.333333333333333 G flour required: 5.0 G

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
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   

should look like this:


Amount of Grams in cake (G): 10

#Then calculates:

sugar required: 1.6666666666666665 G

chocolate required: 3.333333333333333 G

flour required: 5.0 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