@mvaganov/

songlyricsExample2018.1

Python

example code for the 'song lyrics' assignment for Mr.V's Exploring Computer Science class

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.39132543912781736","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"IyBtci5WIG1hZGUgdGhpcwpkZWYgYmFieSgpOgogICAgYiwgbCA9ICJiYWJ5ICIsICJsaWtlICIKICAgIHYgPSBsK2IqMysib2hcbiIKICAgIHByaW50KHYrbCtiKjMrIm8iKjgrImhcbiIrdisiSSB0aG91Z2h0IHlvdSdkIGFsd2F5cyBiZSBtaW5lIikKZGVmIG1hcnkoKToKICAgIGwsIG0gPSAibGl0dGxlIGxhbWJcbiIsICJtYXJ5IGhhZCBhICIKICAgIHByaW50KG0rbCozK20rbCsid2hvc2UgZmxlZWNlIHdhcyB3aGl0ZSBhcyBzbm93IikKZGVmIGJldHRlck5vdygpOgogICAgYix5LGx5ZCxraT0iIGJldHRlciBub3ciLCJ5b3UgIiwiIGxldCB5b3UgZG93biIsImtub3cgSSAiCiAgICBneWUsbmE9IiBhbnl0aGluZywgd291bGRhIGdhdmUgeW91IGV2ZXJ5dGhpbmciLCIgbm90IGFyb3VuZCIKICAgIG5tdCxzLHc9Im5ldmVyIG1lYW50IHRvIiwib25seSBzYXkgdGhhdCAnY2F1c2UgIiwiV291bGRhIGdhdmUiCiAgICBwcmludCh5KyJwcm9iYWJseSB0aGluayB0aGF0IHlvdSBhcmUiK2IrIiwiK2IrIlxuIit5K3MrIkknbSIrbmErIiwiK25hKyJcbiIreStraStubXQrbHlkKyIsIitseWQrIlxuIit3K2d5ZSsiXG4iK3kra2krInNheSB0aGF0IEkgYW0iK2IrIiwiK2IrIlxuIisiSSAiK3MrInlvdSdyZSIrbmErIiwiK25hKyJcbiIreStraStubXQrbHlkKyIsIitseWQrIlxuIit3K2d5ZSsiIChvaCB3b3cpIikKCmFuc3dlciA9IGlucHV0KCJ3aGF0IHNvbmc/IGJhYnksIG1hcnksIGJldHRlciIpCmlmIGFuc3dlciA9PSAiYmFieSI6CiAgICBiYWJ5KCkKaWYgYW5zd2VyID09ICJtYXJ5IjoKICAgIGJhYnkoKQppZiBhbnN3ZXIgPT0gImJldHRlciI6CiAgICBiZXR0ZXJOb3coKQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# mr.V made this
def baby():
    b, l = "baby ", "like "
    v = l+b*3+"oh\n"
    print(v+l+b*3+"o"*8+"h\n"+v+"I thought you'd always be mine")
def mary():
    l, m = "little lamb\n", "mary had a "
    print(m+l*3+m+l+"whose fleece was white as snow")
def betterNow():
    b,y,lyd,ki=" better now","you "," let you down","know I "
    gye,na=" anything, woulda gave you everything"," not around"
    nmt,s,w="never meant to","only say that 'cause ","Woulda gave"
    print(y+"probably think that you are"+b+","+b+"\n"+y+s+"I'm"+na+","+na+"\n"+y+ki+nmt+lyd+","+lyd+"\n"+w+gye+"\n"+y+ki+"say that I am"+b+","+b+"\n"+"I "+s+"you're"+na+","+na+"\n"+y+ki+nmt+lyd+","+lyd+"\n"+w+gye+" (oh wow)")

answer = input("what song? baby, mary, better")
if answer == "baby":
    baby()
if answer == "mary":
    baby()
if answer == "better":
    betterNow()