10.2 Python Power Up Project

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Student’s name: Instrument number: 10.

Teacher’s name: Mr Murtagh

Date issued: 16th May 2022

Subject Digital Solutions Term 2

Technique Project

Unit Title Python Power-up

Enduring Understandings: How complex programs are developed by combining many simple building blocks

Conditions

Duration 3 weeks

Mode Program and documentation Equipment Laptop


Thonny

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

 Determine - decide or come to a resolution

 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

The student work has the following characteristics Marks


 accurate and discriminating recognition and discerning description of algorithms using pseudocode
5–6
 adept symbolisation of algorithms using flowcharts, and algorithm tracing using a trace table
 appropriate recognition and description of algorithms using pseudocode
3–4
 competent symbolisation of algorithms using flowcharts, and algorithm tracing using a trace table
 variable recognition and superficial description of algorithms using pseudocode
1–2
 variable symbolisation of algorithms using flowcharts, and algorithm tracing using a trace table
 does not satisfy any of the descriptors above 0

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

CRITERION: SYNTHESISING AND EVALUATING

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

The student work has the following characteristics Marks


 coherent and logical synthesis of relevant information and ideas to determine algorithm designs using flow-charts and 7–8
pseudocode.
 purposeful generation of code for efficient programs involving branching, iteration, and functions
 critical evaluation of algorithms using a trace table, and digital solutions against essential criteria in evaluation table
 logical synthesis of relevant information and ideas to determine algorithm designs using flow-charts and pseudocode.
 effective generation of code for programs with involving branching, iteration, and functions 5–6
 reasoned evaluation of algorithms using a trace table, and digital solutions against effective criteria in evaluation table
 simple synthesis of relevant information and ideas to determine algorithm designs using flow-charts and pseudocode.
 adequate generation of code for programs involving branching, iteration, or functions 3–4
 feasible evaluation of algorithms using a trace table, and digital solutions against some criteria in evaluation table
 unclear combinations of information or ideas to determine algorithm designs using flow-charts and pseudocode.
 some generation of code for programs 1–2
 superficial evaluation of algorithms using a trace table, or digital solutions against criteria in evaluation table
 does not satisfy any of the descriptors above 0

CRITERION: COMMUNICATING

OBJECTIVES
8. make decisions about and use mode-appropriate features, language and conventions for particular purposes and contexts

The student work has the following characteristics Marks


 discerning justified decision-making about, and fluent use of:
o written and visual features to communicate about a solution
o language for a technical audience 3–4
o grammatically accurate language structures
o referencing and project conventions
 variable justified decision-making about, and inconsistent use of:
o written and visual features to communicate about a solution
o language for a technical audience 1–2
o grammatically accurate language structures
o referencing and project conventions
 does not satisfy any of the descriptors above 0
Task
You are to choose one of the following program options to create using Python. You will need to complete the
Design Documentation and then write the code.

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

Click bait Headline Generator


Our website needs to trick people into looking at advertisements! But coming up with creative, original content is too hard.
Luckily, with the clickbait headline generator, we can make a computer come up with millions of outrageous fake headlines.
They’re all low quality, but readers don’t seem to mind.
Details
Randomly select words from various lists and then plug them into templates to produce the required number of headlines.
Lists
 Object Pronouns: Her, Him, Them
 Possessive Pronouns: Her, His, Their
 Personal Pronouns: She, He, They
 States: Queensland, New South Wales, Victoria, South Australian, Tasmania, 'Western Australian, Northern Territory, ACT
 Nouns: Athlete, Clown, Shovel, Paleo Diet, Doctor, Parent, Cat, Dog, Chicken, Robot, Video Game, Avocado,
Plastic Straw, Serial Killer, Telephone Psychic
 Places: House, Attic, Bank Deposit Box, School, Basement, Workplace, Donut Shop, Apocalypse Bunker
 When: Soon, This Year, Later Today, RIGHT NOW, Next Week
Templates
 Are Millennials Killing the {noun} Industry?
 Without This {noun}, {plural noun} Could Kill You {when}!
 Big Companies Hate {object pronouns}! See How This {state} {noun} Invented a Cheaper {noun}
 You Won't Believe What This {state} {noun} Found in {possessive pronoun} {place}.
 What {plural noun} Don't Want You To Know About {plural noun}"
 {number} Gift Ideas to Give Your {noun} From {state}
 {number} Reasons Why {plural noun} Are More Interesting Than You Think (Number {number} Will Surprise You!
 This {state} {noun} Didn't Think Robots Would Take {possessive pronoun} Job. {personal pronoun} Were Wrong."
Submission
You will need to submit to Student Café:

 Design Documentation as a pdf


 Your program as a Python script (.py file)

You might also like