Source code from Code For Tomorrow's Python course
Source code is organized under 3 difficulty levels:
1_beginner2_intermediate3_advanced
Under each of the 3 packages, source code is further divided by chapter.
chapter1Intro to Pythonchapter2Datachapter3Operatorschapter4Conditionalschapter5Loopschapter6Listschapter7String Manipulation
chapter8Librarieschapter9Dictionarieschapter102D Listschapter11Functionschapter12Classes
chapter13Special Methodschapter14Selection Sortchapter15Tuples & Setschapter16Pythonnesschapter17Exception Handlingchapter18Recursionchapter19Asymptotic Analysischapter20File I/O
Under each chapter, source code is further divided by category:
examples- example code to demo certain programming conceptspractice- practice exercise templates for students to write codesolutions- solutions to practice exercises
The practice template file has the same name as the corresponding solution file.
Please follow the following guidelines when creating or finding practice problems. We expect all problems submitted by teachers to maintain the highest quality! (You can also read these guidelines on every repository’s README.md.)
If you have questions, send a message to #questions on the teachers Discord.
- Indent properly.
- Make sure there are spaces between binary operators, parentheses, curly braces, etc. when applicable. (For method/function calls, there should not be a space between the method/function name and the parentheses.)
- Name files so that they are representative of what the program is about.
- Avoid naming files after concepts, like “Arrays.java”
- Name variables/methods/functions descriptively, and follow your language’s conventions.
- Java: camelCase for regular variables, snake case (and uppercase) for constants
- Python: Snake case for regular variables, snake case (and uppercase) for constants
- If a line of code is very long, separate it into 2+ lines (e.g. for long lists/arrays, long print statements, etc.)
- Leave whitespace where appropriate to increase readability.
- Add comments to explain parts of your code.
- All code filed under
practiceshould be templates. Templates may include things like an empty class and main method. They must include a multi-line comment with the full instructions that are also displayed on Thinkific at the top of the program. - All code filed under
solutionsshould be solutions. Solutions should include the full instructions at the top of the file and then a possible solution to the problem. - The practice template and solution should have the same file name.
- For Java teachers: Make sure that you have the correct package statement as the first line of your code.
- Hundreds of students and ~50 teachers could potentially see and use your work. Please make sure that it works!
- Check Thinkific to see if the concepts that you need to solve the problem have been covered already.
- Be aware of how long your own class takes on other practice problems.
- Practice problems shouldn’t take several hours/days.
- If you are using data or practice problems from somewhere other than yourself, you MUST cite your sources.
- Providing a link to the original is usually sufficient if you found the problem online.
- If you found it in a book, cite the full title and author.
- Make sure you push to the correct folder and repository.
- Instructions should be formatted as follows:
Practice: [full instructions]
Practice template: practice/[FileName].extension
Solution: solutions/[FileName].extension
To submit a problem, you have 3 options:
- Dm Rebecca Dang on the Teachers Discord with your GitHub username and course(s) you’re teaching to be invited to the C4T GitHub organization
- Clone the repo.
- Create your own branch. Name it appropriately.
- Push your branch to remote.
- Mention @Curriculum Development on the Teachers Discord that you have pushed your branch. Be sure to tell us what the name of your branch is!
- If Curr-Dev approves, you have permission to merge your branch with master.
- Email [email protected] with all necessary info (e.g. instructions, practice template file, solution file).
- Mention @Curriculum Development on the Teachers Discord that you have emailed us please!
Thank you teachers for following these guidelines and helping us build a problem base!