[Python-Help] Programming help
Alfred Canoy
alred at guam.net
Mon Dec 6 03:07:58 CET 2004
Please help me out:(.. I've been trying to figure this out for 2 days now..
I don't know what to use to print all the list of numbers. I hve know idea
how should I do this. I tried a lot of trial & error for the the def, dict,
.list( ). have no luck.
I just need to find this out then I'm good to go for the whole thing. I have
save the other test source code for this problem. I just need to combine it
after I figure this out.
Thank you all!
Source code:
# compute the Mean, Median & Mode of a list of numbers:
sum = 0.0
print 'This program will take several numbers then average them'
count = input(' How many numbers would you like to sum: ')
current_count = 0
freq = {}
freq [current_count] = number
while current_count < count:
current_count = current_count + 1
number = input ('Enter a number: ')
print "Number", current_count,":",number
sum = sum + number
print " [x,...,x] ?"
Al
_ _
_ _
Alfred Canoy
Agana, Guam
Pacific time
alred at guam.net
----- Original Message -----
From: "Matthew Dixon Cowles" <matt at mondoinfo.com>
To: "Alfred Canoy" <alred at guam.net>
Cc: <help at python.org>
Sent: Monday, December 06, 2004 11:50 AM
Subject: Re: [Python-Help] Programming help
> Dear Alfred,
>
>> I'm stuck in the end of my source code. I'm trying to print all the
>> numbers. How can I print all the list of numbers that I selected?
>
> What have you tried and how did the results differ from what you
> expected?
>
> Regards,
> Matt
More information about the Python-list
mailing list