Hello,
I'm very new to programming and am only doing this to expand my mind.
Currently (for educational purposes only) I'm trying to make a simple script for finding the standard deviation using an unlimited number of data points.
in the beginning of the script
n=0
each time a user enters data
n=n+1
what I'm having trouble with is i need the data entered by the user to be stored respectively in a1, a2, a3 etc...
Example
the first time data is entered, n=1 data entered by user = a1
the second time, n=2 data entered by user =a2
if i type
print "a%s" % (n)
the result if n=1 is
a1
if n=2 is
a2
etc..
i need this to work
["a%s" % (n)]= input()
hopefully I'm not a complete tard and some one will understand this enough to tell me whats going wrong.
Any help appreciated but please remember that I'm a noob,...... and dumb.
thank you.
1 reply to this topic
#1
Posted 26 March 2011 - 10:41 AM
|
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









