adults learn to code PYTHON!
This page is the one-stop resource for everything we do in class!
You will be able to find links to slide content, kahoot quizzes and more resources below
HOMEWORK ASSIGNMENT 2
Write a program that mimics a chatbot!
Refer to code that you’ve already worked on!
Your program should make use of decision making through if-elif and else conditions.
To make the program seem more “intelligent”, remember that you can nest decision checks (if-elif condition branching)
within other decision checks.
Your program should continue back and forth with the player (user) for a minimum of 8 questions.
What is your name?
Hey Amina! It’s great to meet you!
What is your fav color?
Well that’s a bright color! What’s your fav food to eat, all the time?
Omg yes, all things potato forever!
In the example above, the conversation maintained itself back and forth for 3 questions.
Feel free to have fun with this assignment, and make it yours!
If you encounter errors, try your best to fix them, they’ll most likely be one of the following:
Spelling Mistakes / Incorrect Keywords
Sometimes the bug is on the previous line rather than where the red highlight is happening
homework assignment 1
Add in dev messages:
Whenever you’re jumping to a new method - Something like:
DEV MESSAGE: Going to LoadCourseOptions()
This is so that you can easily follow the flow of code. You can always remove print statements later
Add in os.system('clear'):
Whenever you’re jumping to a new menu
This is so that you’re only seeing the menu you’re currently concerned with
Add in spaces in your menu:
So that the option is separated from the “Press 1” type options
This is mostly for visual clarity
OTHER USEFUL LINKS
You can ‘preview’ a Kahoot to play it and it will open up the
teachers view and the mobile view on your screen. Just don’t cheat! :D
Need files we worked on in class? Check out this section!
If the file link is broken or the files are a link to an older version, get in touch with your teacher at firstname.lastname@example.org:
Keep in mind that these are teachers copies of the files and as such are not the customized versions of your work
[Currently looking for some of the files haha]
CODING @ HOME INSTALLATION INSTRUCTIONS
VS Code Editor (Advanced Integrated Development Environment)
After installing, open up visual studio code and click the boxy white icon on the left side of the screen (Extensions)
Type in Python in the search bar that appears and download the first Python that pops up in the search list
You may have to restart VS Code to see the Python Extension install
Python Editor Idle ( Download for either Mac OS or Windows OS here )
HOW TO EDIT / VIEW FILES
When editing a python file, right click to ‘Edit with Idle’
HOW TO RUN FILES
Press F5(windows) or FN + F5 (Mac) on your keyboard
To setup function keys (F1, F2, F3 etc.) on your Mac with FN key:
Choose System Preferences from the Apple menu
Click the Keyboard tab if it's not already highlighted
Select "Use all F1, F2, etc. keys as standard function keys”
Because we all need a bit of clever-funny in our lives