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.
For eg:
What is your name?
amina
Hey Amina! It’s great to meet you!
What is your fav color?
red
Well that’s a bright color! What’s your fav food to eat, all the time?
fries
Omg yes, all things potato forever!
Etc etc
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
Missing Symbols
Weird Indents
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
Slide Links
Intro to Object Oriented Programming
Tic-Tac-Toe: Understanding the Design
OTHER USEFUL LINKS
SQL Beginners Tutorial (W3schools)
Unified Modelling Language (UML) Tutorial
Python String Formatting
Share Code Easily (Pre-Formatted)
Review Code using CodingBat
KAHOOT 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
FILE Downloads
Need files we worked on in class? Check out this section!
Note:
If the file link is broken or the files are a link to an older version, get in touch with your teacher at staff@thecubeschool.ca:
Keep in mind that these are teachers copies of the files and as such are not the customized versions of your work
Hangman Game
Tic-Tac-Toe Game
[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 Keyboard
Click the Keyboard tab if it's not already highlighted
Select "Use all F1, F2, etc. keys as standard function keys”
coding jokes
Because we all need a bit of clever-funny in our lives