Question: Q3: Find the errors in the following code and correct them (2 errors): (2 marks) 1. coffee_file = open ('coffee.txt', 'I') 2. print('Enter the following

 Q3: Find the errors in the following code and correct them

Q3: Find the errors in the following code and correct them (2 errors): (2 marks) 1. coffee_file = open ('coffee.txt', 'I') 2. print('Enter the following coffee data:') 3. descr = input('Description: ') 4. qty = int (input ('Quantity (in pounds) : ')) 5. coffee file.write (descr + ' + ) 6. coffee_file.write(qty + ) 7. coffeefile.close()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!