Skip to content

Exercise 3: Code Improvement

Try the prompt templates below with the original main.py (https://github.com/s3-school/pkoffee/blob/Day0/main.py) of the pkoffee project.

PROMPT 1

CODE: <content_of_the_code>
Improve the above code to make it robust, maintainable and easy to read. Explain each modification and why. 

PROMPT 2

Act as an experienced Google engineer and review the following Python code snippet. Provide suggestions for improvements to enhance maintainability, concentrating on readability, modularity, and best practices. Offer concise explanations for each suggested change to facilitate easy integration:
CODE: