1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
S_A_V [24]
3 years ago
14

For this lab you will do 2 things:

Computers and Technology
1 answer:
zepelin [54]3 years ago
4 0

Answer:

Here is the Python program:

COOKIES_PER_BAG = 40 #sets constant value for bag of cookies

SERVINGS_PER_BAG = 10 #sets constant value for serving in bag

CALORIES_PER_SERVING = 300 #sets constant value servings per bag

cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user

print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed

Explanation:

The algorithm is:

  • Start
  • Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
  • Set COOKIES_PER_BAG to 40
  • Set SERVINGS_PER_BAG to 10
  • Set CALORIES_PER_SERVING to 300
  • Input cookies
  • Calculate totalCalories:                                                                                                                       totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
  • Display totalCalories

I will explain the program with an example:

Lets say user enters 5 as cookies he or she ate so

cookies = 5

Now total calories are computed as:

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));  

This becomes:

totalCalories = 5 * (300/40/10)

totalCalories = 5 * (300/4)

totalCalories = 5 * 75

totalCalories = 375

The screenshot of program along with its output is attached.

You might be interested in
What is the differnce between ''P4 and 4P''
34kurt
The number and letter are switched. This question needs more context to get a accurate answer.
5 0
3 years ago
Read 2 more answers
How can you quickly locate emails with large attachments.
IgorC [24]

To locate emails with large attachments, go to your email and then choose the option of Choose File > Cleanup Tools > Mailbox Cleanup.

Here , one has to Log into their email account and open their inbox and then use the Search Mail bar and type Size to locate or they Set the Find items that are larger than to 9999 and then one has to click Find.

<h3>How do I find emails by attachment size?</h3>

This can also be done for messages that has a size equal to or bigger than 25.

One has to open their message and then they have to right-click on the attachment. You can choose Save As and save to the location of the choice you want.

Learn more about attachments from

brainly.com/question/978078

4 0
2 years ago
When attaching a file or files in outlook 365 you select the attach command and then select the files location
mamaluj [8]

Answer:

When you click the attachment button a window pops up allowing you to select the file/s you want to upload

You can also drag and drop file/s this is an alternative method

Explanation:

Microsoft Outlook is a personal information manager software system from Microsoft.

Though primarily an email client, Outlook also includes such functions as calendaring, task managing, contact managing, note-taking, journal logging, and web browsing. Wikipedia

3 0
2 years ago
can somebody tell me what straykids 2021 collab is gonna be with because i think its gonna be with blackpink
valkas [14]

Answer:

Red velvet: Red Velvet made its debut in 2014, so it is highly probable that SM Entertainment might announce whether or not members of the group will continue to stay in the company by the end of 2021.

Explanation:

Probably black and white, or gold and white Or Gucci clothes.

7 0
2 years ago
Read 2 more answers
What are ways to access Tasks view in Outlook? Check all that apply. Select To-Do List or Task Folder. View daily task lists in
SVETLANKA909090 [29]

Answer:

A. B. D. E.

Explanation:

edg 2021

8 0
3 years ago
Read 2 more answers
Other questions:
  • What does that program print out?<br><br> a) 2<br> b) 3<br> c) 4<br> d) 8
    14·2 answers
  • _____ remove the part of an image starting from an edge​
    13·1 answer
  • A digital designer might do computer animation or video games true or false
    13·2 answers
  • Seth would like to make sure as many interested customers as possible are seeing his business’s website displayed in their searc
    9·1 answer
  • What is the difference between a try block and a try statement? Group of answer choices There is no difference; the terms can be
    6·1 answer
  • In which client/server relationship can a computer act as both a client AND a server? Select one: a. X-Windows b. SSH c. Classic
    8·1 answer
  • **NEED HELP??!! Computer Science Questions!! KNOWING GIMP!!!!
    7·1 answer
  • Thoughts on copyright?
    8·1 answer
  • Have you ever tried using such a camera?​
    5·1 answer
  • Can you help me with this question please ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!