Skip to content

Instantly share code, notes, and snippets.

from PIL import Image, ImageTk
import tkinter as tk
from random import randint
notes = ["C", "D", "E", "F", "G", "A", "B", "C", "D", "E", "F", "G"]
noteFiles = ["Notes\\middle_c.png", "Notes\\low_d.png", "Notes\\low_e.png",
"Notes\\low_f.jpg", "Notes\\low_g.png", "Notes\\a.jpg",
"Notes\\b.png", "Notes\\high_c.jpg", "Notes\\high_d.jpg",
"Notes\\high_e.png", "Notes\\high_f.jpg", "Notes\\high_g.png"]
from random import randint
import unittest
class CoinFlipSimulator():
"""Simulate a coin flip of a specific amount of flips"""
def __init__(self, number_of_flips):
self.number_of_flips = number_of_flips
self.sides_list = []
def simulation(self):
"""Perform the actual coin flips"""
from random import randint
class CoinFlipSimulator():
"""Simulate a coin flip of a specific amount of flips"""
def __init__(self, number_of_flips):
self.number_of_flips = number_of_flips
def simulation(self):
"""Perform the actual coin flips"""
self.sides_list = []
magicians = ['joe', 'bob', 'alberto']
def show_magicians(magicians):
for magician in magicians:
print magician
''' 8-10. Great Magicians: Start with a copy of your program from Exercise 8-9. Write a function called make_great()
that modifies the list of magicians by adding the phrase the Great to each magician’s name. Call show_magicians() to see that the
list has actually been modified. '''