Technest 1: Introduction to Computer Coding (Python)
MITx 6.00.1x_SJCC, EdX, Spring 2021
Final Grades: A
All code in this course uses Python 3.8.
Skill: Python (Game)
Welcome to the game, Hangman!
This project used Python to write a small game called Hangman. The computer randomly selects a Secret Word and tells the player how many letters it contains. The player guesses one letter per round and gets feedback immediately about whether the guess appears in the Secret Word and a display of the partially guessed word. The default is eight guesses, but it can be configured.
- Skills used: for loops, while loops, functions, String/list operations, module import
Skill: Python (Game)
Encrypting with the Caesar Cipher
This project used Python to encrypt and decrypt messages with the Caesar Cipher. The idea of the Caesar Cipher is to pick an integer and shift every letter of the message by that integer alphabetically. The user provides a plain text message and the integer, which can be encrypted by using the PlaintextMessage function. The user can also provide an encrypted text message, and the CiphertextMessage function can be used to decrypt it.
- Skills used: for loops, while loops, functions, String/list operations, Assertions/Exceptions, Classes/Inheritance, Dictionaries, module import, getter/setter
Skill: Python (Game)
Scrabble with your computer (or “SkyNet” if you like)
This project used Python to write a small game called Scrabble. The computer generates a list of letters, and the user can enter words made up of these letters. The computer checks whether the word is valid and assigns the appropriate score. If the user plays all the letters on the first try, he or she will get 50 bonus points. The game allows the user to play an arbitrary number of hands. The user can choose to play a new, random hand or replay the last hand.
An updated version enables the computer (aka “SkyNet”) to play the game. The user can compare his or her score to the computer's performance.
- Skills used: for loops, while loops, functions, String/list operations, Dictionaries, Assertions/Exceptions, module import
Skill: Python (Calculations)
Understand the power of compound interest
This program performs several calculations:
- It calculates the credit card balance after one year if the cardholder only pays the minimum monthly payment required each month.
- It calculates the minimum fixed monthly payment required to pay off the credit card balance within 12 months.
- It uses a binary search to optimize the program and find the minimum fixed monthly payment required to pay off the credit card balance within 12 months.