BYU Student Author: @Benjamin_Lau
Reviewers: @James_Gerstner, @Trent_Barlow
Estimated Time to Solve: 40 Minutes
We provide the solution to this challenge using:
- ChatGPT
- Excel
- Python
Need a program? Click here.
Overview
Generative AI is becoming increasingly intelligent, transforming how we access and value knowledge. In the realm of education, this technology has made knowledge cheaper and more accessible than ever before. This challenge will demonstrate the power of generative AI, particularly its potential to revolutionize learning in fields such as accounting. You will be tasked with using ChatGPT to create an accounting dictionary. Following that, you will utilize Python to develop a platform that enables you and other users to interact with this dictionary data, thereby facilitating a novel way to learn accounting.
Instructions
- The data file gives you a list of accounting vocabulary and a blank “Explanation” column. Use ChatGPT to find out the explanations for these words. Copy and paste these explanations to the data file next to the word they describe. Try to prompt ChatGPT with phrases like “explain these as if you are explaining them to a 5-year-old child.” You can use different prompts according to your personal preference. Chat does better with small chunks: 10-20 terms.
- After generating the dictionary, close the Excel file and open a coding environment, like Visual Studio Code, Jupyter Notebook, etc. You will use Python to create an interactive platform to learn from this dictionary.
- Import pandas. Load in the data file as a pandas DataFrame. You can decide to keep the values as Pandas DataFrame or create a Python dictionary where the keys are the terms and the values are the explanations.
- Prompt the user to type in the accounting word he/she want to learn and store that in a variable. Make sure you make that case insensitive.
- If the word is in the dictionary, print out the explanation. After that, prompt user to answer if he/she wants to continue or not. If he/she wants to continue, repeat the process. If not, end the program.
- If the word is NOT in the dictionary, tell the user the word is not in the dictionary and ask if the user wants to quit or continue. If he/she wants to continue, repeat the process. If he/she wants to quit, end the program.
Data Files
Suggestions and Hints
- If you prompt ChatGPT to return the results in a table format, you can just copy and paste the table to the data file.
- Use input() to prompt the user.
- When looking up the explanation for a word, consider using .query() and .iloc[0].
Solution