10.2 Python Power Up Project
10.2 Python Power Up Project
Technique Project
Enduring Understandings: How complex programs are developed by combining many simple building blocks
Conditions
Duration 3 weeks
Cognitive Verbs
Describe - give an account (written or spoken) of a situation, event, pattern or process, or of the characteristics or features of
something
Analyse - break down or examine in order to identify the essential elements, features, components or structure
Synthesise combine different parts or elements (e.g. information, ideas, components) into a whole, in order to create new
understanding
Generate produce
Evaluate make judgments about ideas, works, solutions or methods in relation to selected criteria
Feedback
Grade
CRITERION: RETRIEVING AND COMPREHENDING
OBJECTIVES
1. recognise and describe binary representations of data, design elements of digital systems, and tracing algorithms
2. symbolise user experience designs, algorithms, and algorithm tracing; explain binary representations of data, and user
experience
CRITERION: ANALYSING
OBJECTIVES
3. analyse binary representations of data and real-world problems
4. determine solution requirements and criteria considering functional requirements, future risks, and economic,
environmental, social, technical and usability constraints
The student work has the following characteristics Marks
insightful analysis of real-world problems using MuSCoW table
astute determination of solution requirements and essential criteria considering functional requirements in the 6–7
Requirements table
considered analysis of real-world problems using MuSCoW table
logical determination of solution requirements and effective criteria considering functional requirements in the 4–5
Requirements table
appropriate analysis of real-world problems using MuSCoW table
reasonable determination of solution requirements and some criteria considering functional requirements in the 2–3
Requirements table
makes statements about real-world problems using MuSCoW table
1
vague determination of some requirements and some criteria in the Requirements table
does not satisfy any of the descriptors above 0
OBJECTIVES
5. synthesise information and ideas to determine appropriate binary representations of data, alternative user experiences,
and algorithm designs
6. generate programs with user interfaces involving branching, iteration, and functions
7. evaluate binary representations of data, user experience, algorithms, and digital solutions against criteria to make
refinements and justified recommendations
CRITERION: COMMUNICATING
OBJECTIVES
8. make decisions about and use mode-appropriate features, language and conventions for particular purposes and contexts
Wordle
Replicate a text-based version of the latest fad game Wordle
Rules
User has six chances to guess random a five-letter word.
After entering a word, it is checked to see if it is correct
If it is not correct, the user is given hints about each letter
o If the letter is in the correct place, an ‘O’ is shown in its place
o If the letter is in the word, but in the incorrect place, a ‘?’ is shown in its place
o If the letter is not in the word, a ‘X’ is shown in its place
The random word is loaded from a provided text file containing a list of possible words.
Blackjack
Blackjack, also known as 21, is a card game where players try to get as close to 21 points as possible without going over.
Create a text-based version of this game.
Rules
The player competes against the ‘house’, otherwise known as the dealer
The player starts with $5,000
Try to get as close to 21 without going over – if you go over you automatically loose
Card values:
o Kings, Queens, and Jacks are worth 10 points.
o Aces are worth 1 or 11 points.
o Cards 2 through 10 are worth their face value.
A player can choose to:
o Hit (take another card)
o Stand (stop taking cards)
o On their first play, they can Double down to increase your bet but must hit exactly one more time before
standing.
If the play wins, they get the value of their bet
In case of a tie, the bet is returned to the player
The dealer must stop hitting at 17 or more
Useful unicodes
The Unicode numbers for the suit characters are:
Hearts: 9829
Diamonds: 9830
Spades: 9824
Clubs: 9827
Code maker and code breaker
The Caesar cipher is an ancient encryption algorithm used by Julius Caesar. It encrypts letters by shifting them over by a
certain number of places in the alphabet.
Details
We call the length of shift the key. For example, if the key is 3, then A becomes D, B becomes E, C becomes F, and so on. To
decrypt the message, you must shift the encrypted letters in the opposite direction.
It is easy to hack messages encrypted with the Caesar cipher, even if you don’t know the key. There are only 26 possible keys
for the Caesar cipher, so a computer can easily try all possible decryptions and display the results to the user. In cryptography,
we call this technique a brute-force attack.
Project
Create a program that will do three things:
1. Accept a message with a key and encrypt it using a Caesar cipher
2. Accept an encrypted Caesar cipher message and key and decrypt it back to its original message
3. Accept an encrypted Caesar cipher message and use a brute-force attack to find the original message
Cho-Han
Cho-han is a dice game played in gambling houses of feudal Japan. Two six-sided dice are rolled in a cup, and gamblers must
guess if the sum is even (cho) or odd (han). The house takes a small cut of all winnings.
Rules
The user starts with $5000, and chooses the amount the wish to bet
The dealer rolls the dice, but keeps the results hidden
The player then chooses Cho (even) or Han (odd)
The dice are revealed and are added to give the total
If the player win, they get the value of the bet, minus 10% which is the house’s cut