Skip to content

Instantly share code, notes, and snippets.

View MisterBrash's full-sized avatar
😀
I am crazy going slowly...

MisterBrash MisterBrash

😀
I am crazy going slowly...
View GitHub Profile
@MisterBrash
MisterBrash / More For.md
Last active April 17, 2024 02:25
ICS3U More For-Loop Practice

More For Loop Practice

Are you fully caught up on while, do while and for loops? Looking for more practice?
You can use the same code file that you used last class or make a new one - up to you.

Try these challenges out

  • printLine(char, width) that prints a single line of char's of length width. You will use a for-loop to accomplish this. For Example:
@MisterBrash
MisterBrash / levels.md
Last active November 20, 2023 15:36
Various challenges to practice Python coding using the Unicorn-HAT-HD (or the simulator)

Unicorn HAT Challenges

Create a new file for each level (level1.py, level2.py, etc). Clicking on the animation will enlarge it.

Level 1 - Randomly light up a single pixel a random colour forever.

Level 2 - Randomly light up a single pixel white forever (but no other lights are on)

@MisterBrash
MisterBrash / guessing_game.py
Created October 24, 2023 18:13
Guessing Game demonstration given in class on October 24th
import unicornhathd as u
import random
# Clear the unicorn hat
u.off()
# Generate a random number
hidden_number = random.randint(1, 10)
user_guess = -1