Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your objective is to write Python code that will determine how many times the produce name Ginger' appears in the file. You have to write
Your objective is to write Python code that will determine how many times the produce name "Ginger' appears in the file.
You have to write the code and test itIf your code is correct, your will get as your result!
Hint: Using openpyxl, import the file into a workbook. You need to change your Python working directory to the folder that contains the produce file. Get the active worksheet. Find the maximum rows in the sheet. Iterate through the sheet. Keep a running count for 'Ginger. For each row in column If the cell value is 'Ginger, increment the Ginger count. Finally, print out the Ginger count.
After you write the code and run it copy your code in the answer section. Pay attention to the indentation! Else I will take away points.
Also write down the answer that you get ie the # of times Ginger occurs
The Code is graded for points. You will also get partial credit even if the code is wrong or does not compile or does not give the correct answer.
But your code has to be original. Do not copy from others or elsewhere! I can easily spot copied code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started