[email protected] wrote:
I want to know how to use multiple parameters for 1 function


def display(message):
        print message

def rate_score():
    score = rate_score
if rate_score <= 999:
    print "that's nothing."
elif rate_score <= 10000:
    print "ok."
elif rate_score >= 10000: print "great."
#main           

display("Get  the meaning !")

raw_input("Please type in your score")
print "here's your score", rate_score
rate_score()
This is the outcome:

great.
Get the meaning
Please type in your score50
here's your score <function rate_score at 0x025610F0>

Here is something that you can try;

#!/usr/bin/python

def display(message):
    print message

def rate_score(selection):
    if selection <= 99:
        print 'Thats nothing !'
    else:
        print 'Thats something !'

def main():
    display('Get the meaning !')
    while True:
        try:
            selection = int(raw_input('Please enter your score: '))
            break
        except ValueError:
            print 'Oops! Did you forget to enter a number !'
    print 'You entered %s as your score' % selection
    rate_score(selection)

main()


--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to