Category Archives: Assessment

List: TwoMatchingFiles_YI.py

Classwork: questions on edmodo.com

Homework: Given the following code

rect_a = 'a'
rect_b = 'b'
rect_c = 'c'
rect_d = 'd'
rect_e = 'e'
rect_f = 'f'
rect_g = 'g'
rect_h = 'h'

original_images = ['trees.bmp','sky.bmp','water.bmp','lilypads.bmp','trees.bmp','sky.bmp','water.bmp','lilypads.bmp']
    
rectangles = [rect_a,rect_b,rect_c,rect_d,rect_e,rect_f,rect_g,rect_h]


## Write a program in python, YI_twoMatchingFiles.py to prompt the user for two strings from 'a' through 'h'(in the alphabet). Use the variables shown above.
## 1. Check if the user guesses two matching bmp file names. Use a for loop to accomplished this.
## 2. Loop until the user found a match.
## 3. Prompt the user to quit? or play again?
## 4. If play again is selected, randomly scramble the bmp file names before the program continues.
## 5. If you already written your program for the matching cards, copy your code snippet
##    for this part of the program. 

pygame: space invaders

Collision detection and input

Simplified Space Invaders
https://www.mysteinbach.ca/game-zone/1755/alien-invaders/

You can simplify the invaders to have different shapes.
You can simplify the shape of the buildings.
The behavior of the game has to be the same:
a. The invaders move right to left as they move down.
b. The bullets destroy the invaders ( they disappear).
c. The bullets destroy the buildings ( they disappear).
d. Keep score and lives.
e. Final message: Game Over

Optional Challenge: Have different levels of difficulty

Simplified Space Invaders
space invaders