Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python On the second picture is a example do you mind just make look like that's how my professor wanted to be like thank you

image text in transcribed

image text in transcribed

Python

On the second picture is a example do you mind just make look like that's how my professor wanted to be like thank you it will be appreciated

A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 "servings" in the bag and that a serving equals 300 calories. Write a program that asks the user to input how many cookies he or she ate and the reports how many total calories were consumed. Let's start off by getting your name Bob Hello Bob, next let's see how many calories you have consumed in cookies today. Please enter the number of cookies consumed: 5 You must use constants to store all information given in the above description. Then use the constants in your math after asking the user how many cookies they ate. Make sure to write the algorithm firstll Then space it out with your code around it. Here it is Bob, you consumed 375 calories. Thank you for using my cookie calorie counter! *Hint - you have to store the input of how many cookies they ate as a whole number. End of document Underlined values in the sample output means the user is typing that in. Upload the completed python file here Sample Output WELCOME TO THE COOKIE CALORIE COUNTERI 2 2-2-2021 program.py - C:\Users\mcucc\OneDrive\Desktop\COP1C File Edit Format Run Options Window Help @ 2, 2021 #program to calculate the number of miles trav #based on user input of kilometers #define main function def main (): #Dclare constant to store conversion conversion = 0.6214 #Declare and intialize string variab1 name = #Declare and intialize real variable kilometers = miles = 0.0 #Display introduction print("welcome to my miles conversion print("i will ask for a number of kil print ("display the number of miles ya I #prompt user for name name = input ("what is your name?") #prompt user for kilometers traveled kilometers = float (input ("how many kilomete #set miles kilometers * conversion miles = kilometers * conversion #Display name and miles to user #user commas in print print("great job", name, your've traviled #now use concatenation print("great job" + name + your've travil 11 #. format method is newer, but sill not the print("great job", name, you've traveled #f mormatting is the way to go print (f"great job (name), you've traveld [m #Display outro print(" thanks you for using my program!") main

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

Students also viewed these Databases questions