Part 1 - Write the ingredients list to a file (10 points) Modify the program you developed for Lab 5 to make it output the data in the same format to a text file cake_ingredients_list.txt Note: Writing to a file is easier to code, so let's do that first. Hints: After the file has been opened, call the .write() function to write one line at a time to the file, in almost the exact fashion as calling print

Answers

Answer 1

Answer:

Explanation:

I do not have access to the ingredients list so instead I created the list and added the ingredients needed to make a cake. Then I used a for loop to loop throught the ingredients in the list and the .write() method to write the data to a text file with the same name as in the question. The code was tested and the output to the file can be seen in the attached image below.

ingredients = ['sugar', 'butter', 'eggs', 'vanilla', 'flour', 'baking powder', 'milk']

file = open('cake_ingredients_list.txt', 'w')

for ingredient in ingredients:

   file.write(ingredient + '\n')


Related Questions

10. Question
What are the drawbacks of purchasing something online? Check all that apply.

Answers

Explanation:

1) the quality of purchased good may be low

2) there might me fraud and cheaters

3) it might be risky

4) we may not get our orders on time

There are many drawbacks of purchasing online, some of them are as follows,

Chance of pirated item in place of genuine product.Chances of fraud during digital purchase and transaction.Product not deliver on time as expected.Not getting chance to feel the product before purchase.

These are some of the drawbacks of purchasing something online.

Learn more: https://brainly.com/question/24504878

which technique is the best to help you manage time better ​

Answers

Answer:

Make a schedule and select certain times to do certain things so that you could have time for more things.

Explanation:

I did the same thing now I can make time for myself.

Explain how data structures and algorithms
are useful to the use of computers in
data management (10 marks)


Explain how data structure and uses of computer in data management

Answers

Answer:

Data management is a important tool for data handling.

Explanation:

A good knowledge about the data stricture and data management is a prerequisite for working with codes and algorithms. It helps to identify the techniques for designing the algorithms and data storage in the system. It helps to find out the data hierarchy. Thereby allowing the data management in an efficient and effective way. It can increase the skills in computer programming

What is the different type of secondary memory of a computer system.? explain

Answers

Explanation:

Solid state storage devices

optical storage devices

magnetic storage devices

Definition of my computer​

Answers

Answer:

a programmable electronic device designed to accept data

Explanation:

a programmable electronic device designed to accept data

A programmable divce

2. Which property is used for hiding text of the textbox?
a) Password Char b) Text Char c) Char Password d) Pass Char

Answers

Answer:

password char

Explanation:

The password char property allows the text being written in the textbox to be hidden in the form of dots or stars. As such the user entering the password is secure, as no one nearby can know the password by watching the texts.

what is tha length of Mac address ?​

Answers

Answer:

short length which includes all details about the addres

why am i doing the investigation​

Answers

Because it’s your interest

2) What are three categories of computer languages? 3) Write four components of a QBASIC window. 4) What are the three types of operators in QBASIC? 5) What is the use of connector symbol in flowchart? 6) What is a computer network? 7) State two uses of Internet. 8) Write three examples for web browser. 9) Name some popular ISPs in Sri Lanka. 10) Differentiate between MAN and PAN.​

Answers

Answer:

2: assembly language , machine language and high level language

3: a character set , constants , variables , statements , operators and expressions

3. A 3D model of a designed product would be used to communicate the

Answers

Answer:

A 55

Explanation:

A 3D model of a designed product would be used to communicate the photorealistic renditions of the product.

What is 3D?

It should be noted that 3D modeling is the process if developing a coordinate representation of an object.

In this case, a 3D model of a designed product would be used to communicate the photorealistic renditions of the product.

Learn more about 3D on:

brainly.com/question/26350554

#SPJ2

Write a program that creates an an array large enough to hold 200 test scores between 55 and 99. Use a Random Number to populate the array.Then do the following:1) Sort scores in ascending order.2) List your scores in rows of ten(10) values.3) Calculate the Mean for the distribution.4) Calculate the Variance for the distribution.5) Calculate the Median for the distribution.

Answers

Answer:

Explanation:

The following code is written in Python. It uses the numpy import to calculate all of the necessary values as requested in the question and the random import to generate random test scores. Once the array is populated using a for loop with random integers, the array is sorted and the Mean, Variance, and Median are calculated. Finally The sorted array is printed along with all the calculations. The program has been tested and the output can be seen below.

from random import randint

import numpy as np

test_scores = []

for x in range(200):

   test_scores.append(randint(55, 99))

sorted_test_scores = sorted(test_scores)

count = 0

print("Scores in Rows of 10: ", end="\n")

for score in sorted_test_scores:

   if count < 10:

       print(str(score), end= " ")

       count += 1

   else:

       print('\n' + str(score), end= " ")

       count = 1

mean = np.mean(sorted_test_scores)

variance = np.var(sorted_test_scores, dtype = np.float64)

median = np.median(sorted_test_scores)

print("\n")

print("Mean: " + str(mean), end="\n")

print("Variance: " + str(variance), end="\n")

print("Median: " + str(median), end="\n")

what was the main purpose of napiers bone?​

Answers

Answer:

Napier's bones is a manually-operated calculating device created by John Napier of Merchiston, Scotland for the calculation of products and quotients of numbers. The method was based on lattice multiplication, and also called 'rabdology', a word invented by Napier.

Answer:

The main purpose of napiers bone is to fine products and quotient of divisions.

Create union floatingPoint with members float f, double d and long double x. Write a program that inputs values of type float, double and long double and stores the values in union variables of type union floatingPoint. Each union variable should be printed as a float, a double and a long double. Do the values always print correcly? Note The long double result will vary depending on the system (Windows, Linux, MAC) you use. So do not be concern if you are not getting the correct answer. Input must be same for all cases for comparison Enter data for type float:234.567 Breakdown of the element in the union float 234.567001 double 0.00000O long double 0.G0OO00 Breaklo n 1n heX float e000000O double 436a9127 long double 22fde0 Enter data for type double :234.567 Breakdown of the element in the union float -788598326743269380.00OGOO double 234.567000 long double 0.G00000 Breakolon 1n heX float 0 double dd2f1aa0 long double 22fde0 Enter data for type long double:

Answers

Answer:

Here the code is given as follows,

#include <stdio.h>

#include <stdlib.h>

union floatingPoint {

float floatNum;

double doubleNum;

long double longDoubleNum;

};

int main() {

union floatingPoint f;

printf("Enter data for type float: ");

scanf("%f", &f.floatNum);

printf("\nfloat %f ", f.floatNum);

printf("\ndouble %f ", f.doubleNum);

printf("\nlong double %Lf ", f.longDoubleNum);

printf("\n\nBreakdown in Hex");

printf("\nfloat in hex %x ", f.floatNum);

printf("\ndouble in hex %x ", f.doubleNum);

printf("\nlong double in hex %Lx ", f.longDoubleNum);

printf("\n\nEnter data for type double: ");

scanf("%lf", &f.doubleNum);

printf("float %f ", f.floatNum);

printf("\ndouble %f ", f.doubleNum);

printf("\nlong double %Lf ", f.longDoubleNum);

printf("\n\nBreakdown in Hex");

printf("\nfloat in hex %x ", f.floatNum);

printf("\ndouble in hex %x ", f.doubleNum);

printf("\nlong double in hex %Lx ", f.longDoubleNum);

printf("\n\nEnter data for type long double: ");

scanf("%Lf", &f.longDoubleNum);

printf("float %f ", f.floatNum);

printf("\ndouble %f ", f.doubleNum);

printf("\nlong double %Lf ", f.longDoubleNum);

printf("\n\nBreakdown in Hex");

printf("\nfloat in hex %x ", f.floatNum);

printf("\ndouble in hex %x ", f.doubleNum);

printf("\nlong double in hex %Lx ", f.longDoubleNum);

return 0;

}

Which of the following acronyms refers to a network or host based monitoring system designed to automatically alert administrators of known or suspected unauthorized activity?
A. IDS
B. AES
C. TPM
D. EFS

Answers

Answer:

Option A (IDS) is the correct choice.

Explanation:

Whenever questionable or unusual behavior seems to be detected, another alarm is sent out by network security equipment, which would be considered as Intrusion Detection System.SOC analysts as well as occurrence responders can address the nature but instead, develop a plan or take steps that are necessary to resolve it predicated on such notifications.

All other three alternatives are not related to the given query. So the above option is correct.

Create a Python dictionary that returns a list of values for each key. The key can be whatever type you want.

Design the dictionary so that it could be useful for something meaningful to you. Create at least three different items in it. Invent the dictionary yourself. Do not copy the design or items from some other source.

Next consider the invert_dict function.

def invert_dict(d):
inverse = dict()
for key in d:
val = d[key]
if val not in inverse:
inverse[val] = [key]
else:
inverse[val].append(key)
return inverse

Modify this function so that it can invert your dictionary. In particular, the function will need to turn each of the list items into separate keys in the inverted dictionary.
Run your modified invert_dict function on your dictionary. Print the original dictionary and the inverted one.
Describe what is useful about your dictionary. Then describe whether the inverted dictionary is useful or meaningful, and why.

Answers

Answer:

Explanation:

# name : [animal type, age, sex]

animal_shellter = {

 "Teddy": ["dog",4,"male"],

 "Elvis": ["dog",1,"male"],

 "Sheyla": ["dog",5,"female"],

 "Topic": ["hamster",3,"male"],

 "Kuzya": ["cat",10,"male"],

 "Misi": ["cat",8,"female"],

}

print(animal_shellter)

print("")

def invert(d):

 inverse = dict()

 for key in d:

   val = d[key]

   for item in val:

     if item not in inverse:

       inverse[item] = [key]

     else:

       inverse[item].append(key)

 return inverse  

inverted_shellter = invert(animal_shellter)

print(inverted_shellter)

Consider a short, 90-meter link, over which a sender can transmit at a rate of 420 bits/sec in both directions. Suppose that packets containing data are 320,000 bits long, and packets containing only control (e.g. ACK or handshaking) are 240 bits long. Assume that N parallel connections each get 1/ N of the link bandwidth. Now consider the HTTP protocol, and assume that each downloaded object is 300 Kbit long, and the initial downloaded object contains 6 referenced objects from the same sender.

Required:
Would parallel download via parallel instances of non-persistent HTTP make sense in this case? Now consider persistent HTTP. Doyou expect significant gains over the non-persistent case?

Answers

Please send pics and than I sent you lol I wanna wanna play with you lol but I’m gonna play play with this girl and play with me ur mommy mommy play good day bye mommy bye love.

Write a program which will create an array of size 10. Fill the array with random numbers from 0 - 100. (use a loop and random number generator rand) Once you are done with this, you will then write a loop which will go through each element of the array, display the contents of that element and tell if that element is an even number or odd number. Go through all the elements again and this time tell me how many are even and odd.

Answers

Answer:

Explanation:

The following code is written in Java. It randomly generates 10 integers and adds them to an integer array called myArr. Then it loops through the array calculating if each number is even or odd. If it is even it adds 1 to the evenCount variable and prints out the number saying that it is even. Otherwise it adds 1 to the oddCount variable and prints the number saying that it is odd. The program was tested and the output can be seen in the attached image below.

import java.util.*;

class Brainly {

   // Main Method

   public static void main(String[] args) {

       Random rand = new Random();

       int[] myArr = new int[10];

       for (int i = 0; i<10; i++) {

           int n = rand.nextInt(101);

           myArr[i] = n;

       }

       int evenCount = 0;

       int oddCount = 0;

       for (int x : myArr) {

           if ((x % 2) == 0) {

               evenCount += 1;

               System.out.println(x + " is Even");

           } else {

               oddCount +=1;

               System.out.println(x + " is Odd");

           }

       }

       System.out.println("The Array has a total: ");

       System.out.println(evenCount + " Even Numbers");

       System.out.println(oddCount + " Odd Numbers");

   }

}

College
START: what new information, strategies, or techniques have you learned that will increase your technology skills? Explain why its important to START doing this right away

Answers

Answer:

Read Technical Books. To improve your technical skills and knowledge, it's best to read technical books and journals. ...

Browse Online Tutorials. ...

Build-up online profile. ...

Learn new Tools. ...

Implement what you learned. ...

Enrich your skillset. ...

Try-out and Apply.

Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what a big dataset is and why researchers would want to analyze them. The problem is that his audience consists primarily of researchers who have worked with big data before, so this information isn’t useful to them. Which key issue mentioned in the textbook did Mario fail to consider?

Answers

Answer:

Audience knowledge level

Explanation:

The Key issue that Mario failed to consider when preparing for her presentation is known as Audience knowledge level.  

Because Audience knowledge level comprises educating your audience with extensive information about the topic been presented. she actually tried in doing this but she was educating/presenting to the wrong audience ( People who are more knowledgeable than her on the topic ). she should have considered presenting a topic slightly different in order to motivate the audience.

please help!....................

Answers

Answer:

Based on what the graph does on the number line, I would say 1100110

Every time the graph spikes up, that is a one, otherwise it is a zero.

Explanation:

111+ 11- 1


1111+1111




1101 +1101


1010-11​

Answers

Answer: 121, 2222, 2202, 999

Explanation:

Answer:

a. 121

b. 2222

c. 2202

c. 999

1. Which Property is used for changing the background color of any control
a) Font color b) Back color c) Text color d) color back

Answers

'Back Color' is characterized as the CSS property that is employed to modify or alter the background color belonging to any element of control.

B). 'Back Color' is the property that is used for altering the background color.

However, it excludes the margin area of the element and includes the entire size of the element along with the filler. One can select the color of his/her choice in order to promote the readability of the text by contrasting the background color to the text color. Thus, option B is the correct answer.

Learn more about 'CSS properties' here:

brainly.com/question/2671236

You are the IT administrator for a small corporate network. You have recently experienced some problems with devices on the workstation in the Support Office. In this lab, your task is use Device Manager to complete the following:______.
The new network card you installed isn't working as expected (speed is only 1 Mbps). Until you can figure out what the problem is, disable the Broadcom network adapter and enable the Realtek network adapter. To make sure the network adapter has the latest drivers, update the driver for the Realtek network adapter by searching Microsoft Update. You recently updated the driver for your video card. However, the system experiences periodic crashes that you suspect are caused by the new driver. Roll back the driver to a previous version. Move the Ethernet cable to the integrated network port on the motherboard.

Answers

Answer:

I will fix it by my mind by thinking

Based on the above scenario, the steps to take is given below\

What is the management about?

The first thing is to Right-click Start and click on Device Manager and then you expand Network adapters.

Later you Disable the network adapter  and then Update the driver .

Learn more about Ethernet from

https://brainly.com/question/1637942

#SPJ2

what are the services offered by web-based email?​

Answers

Answer:

Web based email is a service that allows to access and use electronic mail via web browser.

It allows clients to login into the email software running on a web server to compose, send and receive, delete mails basically.

What can be used to store data, plant viruses, or steal data?

Answers

Answer:

ITS A SIMPLE ANSWER BUT THE PROBLEM IS TOO BIG!

Explanation:

The phishing email might contain a link which on clicking will take you to a fake web page. For example, the link might take you to a fake bank website which looks very legitimate but in reality is just a lookalike. If the victim falls for the scam and enters his/her account details on the website, the details will actually go to the hacker's server instead of going to the bank and the hacker will have all the information that the victim has provided on the website.

1. Open the start file EX2019-ChallengeYourself-9-3. The file will be renamed automatically to include your name. Change the project file name if directed to do so by your instructor, and save it.
2. If the workbook opens in Protected View, click the Enable Editing button in the Message Bar at the top of the workbook so you can modify the workbook.
3. Use Consolidate to create a summary of real estate sales for all property types. Place the consolidated data on the Summary worksheet in cells B3: C15. Use the Average function to consolidate the data from cells B2: C14 in the Condo, Townhouse, and Single Family worksheets. Include links to the source data.
4. Import individual sales data from the tab-delimited text file Select Sales Data 2019-2020. Import the data as a table in cell A1 of the Select Sales worksheet.
5. Remove the data connection when the import is complete.
6. In the Select Sales worksheet, add data validation to restrict values in the House Type columns (cells B2: B139) to the values in the cell range named PropertyTypes. Include a drop-down list of values in the cells to assist in data correction.
7. Add the following input message to cells B2:B139: Select a property type from the list.
8. Add the following error alert to cells B2:B139: Not a valid property type.
9. Apply data validation circles to any values that violate the data validation rules you just created.
10. Add a comment to cell B1 in the Select Sales worksheet that reads: This needs to be fixed.
11. Add a hyperlink from cell B1 in the Select Sales worksheet to link to the named range (defined name) PropertyTypes. Test the link.
12. Use Flash Fill to add a new column of data to the Select Sales worksheet to display the number of bedrooms/the number of bathrooms.
a. In the Select Sales worksheet, cell F1, type the heading: BR/BA
b. Complete the column of data using this pattern in cell F2: 1 BR/1 BA
You will need to enter at least two samples in order for Flash Fill to suggest the correct autofill data. Check your work carefully.
Sales Summary 2019-2020
Number of Sales Average Selling Price
1
2
3 One BR, One BA
4 One BR, Two BA +
5 Two BR, One BA
6 Two BR, Two BA
7 Two BR, Two BA +
8 Three BR, One BA
9 Three BR, Two BA
10 Three BR, Three BA +
11 Four BR, One BA
12 Four BR, Two BA
13 Four BR, Three BA+
14 Five BR-. One BA
15 Five BR+ Two BA+
16
17
18
19
20
21
22
23
24

Answers

Answer:

Omg what is this

soooo long questionn

i am fainted

what rubbish you written how long the question is of which subject

what's your name

Programming languages categorize data into different types. Identify the characteristics that match each of the following data types.

a. Can store fractions and numbers with decimal positions
b. Is limited to values that are either true or false (represented internally as one and zero).
c. Is limited to whole numbers (counting numbers 1, 2, 3, ...)

Answers

Answer:

a) Integer data type.

b) Real data type.

c) Boolean data type.

Explanation:

a) Integer data type is limited to whole numbers (counting numbers 1, 2, 3…….).

b) Real data type can store fractions and numbers with decimal positions (such as dollar values like $10.95).

c) Boolean data type is limited to values that are either true or false (represented internally as 1 and 0 respectively).

Difference between hardcopy and hardware​

Answers

Hardware is the tangible, or physical, pieces that make up your computer. ... A soft copy (just like software) remains on the computer and cannot be physically touched while a hard copy (just like your computer's hardware) is a printed piece of paper that be be touched

Discuss the OSI Layer protocols application in Mobile Computing

Answers

Answer:

The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software.

hope that helps you

please follow

please mark brainliest

What would be displayed if the “=proper(A1)” function is applied to the cell below?

Answers

The answer is D: Pedro Garcia
Other Questions
plss i reallly need help write a letter to your friend telling him to spend the parts of the long lasting vacation with you 6( n - 2) in word form please c: Which combination of reagents used in the indicated order with benzene will give m-nitropropylbenzene? a. 1) CH3CH2CH2Cl/AlCl3, 2) HNO3/H2SO4 b. 1) HNO3/H2SO4, 2) CH3CH2CH2Cl/AlCl3 c. 1) CH3CH2CH2Cl/AlCl3, 2) HNO3/H2SO4, 3) Zn/HCl d. 1) HNO3/H2SO4, 2) CH3CH2CH2Cl/AlCl3, 3) Zn/HCl What kinds of problems and challenges do the senior citizens face in the Nepalese society? please help me with this ti sao starbuck chn tp HCM u tin 17 Geometry question: Use an algebraic equation to find the measurement of each angle that is represented in terms of X Which of the following is true about cross-cultural non-verbal behavior? find the area of the semi circle plss will mark brainliest! determine if this is a one solution, no solution, or infinite solution equation Which of the following statements best describes firms under monopolistic competition?Group of answer choicesProfits will be positive in the long run.Price always equals average variable cost.In the long run, positive economic profit will be eliminated.Marginal revenue equals the minimum average total cost in the short run. How does a Cloud-first strategy approach a client's migration to the Cloud? Why does Sara compare herself to a soldier and say, I will pretend this is part of a war.? the movie "little princess" analysis this please and Ill give Brainly How can our society progress ? define local autonomy I need help please thank you If the constant is added to every observation of data then arithmatic mean obtained is find the value of x. give reasons to justify your answer NEED HELP ASAP!!!!