IBCS1 - 1314 - October

From WLCS

Thursday - Friday (10/31/13 - 11/1/13)

Agenda:

pygame.init()
pygame.mixer.init()
dotSound = pygame.mixer.Sound("dot.wav")
dashSound = pygame.mixer.Sound("dash.wav")

for ch in m:
    if ch == ".":
        while pygame.mixer.get_busy():
            pass
        print ch,
        dotSound.play()
    if ch == "-":
        while pygame.mixer.get_busy():
            pass
        print ch,
        dashSound.play()
    if ch == " ":
        print ch,
        pygame.time.wait(250)
while pygame.mixer.get_busy():
    pass

Tuesday - Wednesday (10/29/13 - 10/30/13)

Agenda:

  • Demo Morse Code Translator
    1. plain2morse.py test: "the quick brown fox jumps over the lazy dog"
    2. Copy and paste the resulting Morse code into your morse2plain.py
    3. You should see the original plaintext
    4. morse2plain.py test: "- .... .   --.- ..- .. -.-. -.-   -... .-. --- .-- -.   ..-. --- -..-   .--- ..- -- .--. ...   --- ...- . .-.   - .... .   .-.. .- --.. -.--   -.. --- --."

Friday - Monday (10/25/13 - 10/28/13)

Agenda:

Wednesday - Thursday (10/23/13 - 10/24/13)

Agenda:

Monday - Tuesday (10/21/13 - 10/22/13)

Agenda:

Thursday - Friday (10/17/13 - 10/18/13)

Agenda:

Tuesday - Wednesday (10/15/13 - 10/16/13)

Agenda:

Thursday - Friday (10/10/13 - 10/11/13)

Friday - Wednesday (10/4/13 - 10/9/13)

Warmup:

  • Execute the code below
  • When prompted, use 100 for x and 200 for y
  • What does each line do? Analyze!
from turtle import *

setup(200, 400)
screensize(200, 400)
x = numinput("X prompt", "Please enter an x")
y = numinput("Y prompt", "Please enter a y")
goto(x,y)
exitonclick()

Agenda:

Wednesday - Thursday (10/2/13 - 10/3/13)

Agenda:

Tuesday (10/1/13)