> Can you help me with my python code? Im still very new?

Can you help me with my python code? Im still very new?

Posted at: 2014-12-18 
Ok , so Im taking a MOOC right now called An Introduction to Interactive Programming in python and im still very new to this. I want to major in computer science so Im attempting to learn some programming before. Right now im taking some concepts we have learned in class trying to make a program where you will click a button which will select a random number 1-11 and that number correlates to a song which then will print "You're listening to (Song Name). This is all Ive gotten so far and im sorta lost. No hate please. Im just trying my best at something I want to do later in my life.

http://www.codeskulptor.org/#user38_f5IZ...

Positive instructive feedback pls :D

I've never used simplegui (and I don't have it), but it seems that

f.add_button("Select A Random Song" ,ss, 100)

calls ss() without any arguments when you press the button. I don't know if there is a way to make it pass an argument, but, if not, you have to take the parameter away from def ss ().

And then you have to decide what number is

It seems you want it decided by

number = random.randrange (min, max)

return number

but the first line needs to be moved up to the top of song_to_number ()

and both lines are indented too far.

and you should use

--- return song

So, you need

def ss ():

--- print "You're listening to:", number_to_song ()

song == "Hey Porsche"

should be

song = "Hey Porsche"

number == 0

should be

number = 0

= is used for assignments

== is used to test for equality