Created
April 14, 2022 16:47
-
-
Save vsinha/aac4aab4ca4be758f8a6de9709d1dd61 to your computer and use it in GitHub Desktop.
for memorizing notes on the guitar fretboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
sleep_sec = 1 | |
natural_notes = ["A", "B", "C", "D", "E", "F", "G"] | |
prev = None | |
def print_randomly(): | |
global prev | |
curr = random.choice(natural_notes) | |
if prev == curr: | |
curr = random.choice(natural_notes) | |
prev = curr | |
print(curr) | |
while True: | |
print_randomly() | |
time.sleep(sleep_sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment