Sophia's Python based Dictionary Project

FAQ's

What is the purpose of this website?

This website is basically a dictionary; the user enters a word, and the corresponding definition is returned. This website also gives more information about me and what I love to do!

What is the structure of this website?

I made this website using Python, HTML, and CSS. I also use Git as my version-control tool. I edit all code on Github, commit it, and then run the build on render.com which is my hosting service.

There are a few different components of this application:

1. app.py: When the user enters a word, this program reads the word and returns the corresponding definition. app.py also makes sure that a word is actually entered. For example, if the user does not type in anything at all, app.py makes sure that the program does not crash. Error checking is an important part of any program.

app.py also has the code for the URL. So, if the user goes to www.sophipedia.com/profile, app.py makes sure that webpage corresponds to the code I have written on my profile page (profile.html)

2. interactive_english_dic.py - a dictionary that stores all the words and their corresponding definitions

3. home.html: This code allows the user to enter a word, and it also codes the layout of the homepage

4. profile.html: This codes the layout of my profile page

5. faq.html: This codes the layout of the FAQ page

6. layout.html: This is the code for the URL's (home, faq, profile), and it also codes the copyright at the bottom of the page

7. main.css: This codes the layout of the pages: the color, sizes, and positions of the titles of each page

When I enter a word, I get an error message. Why is this?

This program is as good as the dictionary it uses! If you enter a correct word, and that word does not exist in the data dictionary that I am using, the program will not be able to find that word and you will get an error message. So the trick is to keep updating the data dictionary and add words that are missing - that's my job!