None???

News jakle1 at hotmail.com
Sat Sep 20 21:12:04 EDT 2003


I just started using python a few weeks ago. This is my first program. You
input your income and what percent you want to save then it tells you how
much to put away. The the code works, but it puts in the word "none" after
it calls the function. Is the call sytax incorrect? I'd appreciate any
feedback you could offer .

# savings.py    09-14-03

print "Hello, welcome to my savings program."
print
print "I will ask you a few questions then calculate"
print "the info and give you a plan of action."
print
first_name = raw_input("What is your first name? ")
print
last_name = raw_input("What is your last name? ")
print
income = input("How much do you make a year after taxes? ")
print
percent = input("What percent of your income do you want to put aside? ")
print

weekly_income = income/52

def compute(income, percent):
    result = income*percent/100
    print result

print "Ok,",first_name + " " + last_name
print
print "This is how much you should put away a week:"
print "$",compute(weekly_income, percent)
print
print "If you stick to this you will go places!!! :-)"


begin 666 smile.gif
M1TE&.#EA#P`/`*(``````-754O__`.;F5/7U5=O;4____P```"'Y! 44``8`
M+ `````/``\```-):*K0O="T4&IX$(1!A"?#M6B=9PJ$* U"8[H#( 6=Z[EI
J4YR\5^@]W@\P#.HF!-L+D%NU' Y!C$%[1IM4C at FD&FDJA8LLPH!&$@`[
`
end





More information about the Python-list mailing list