[Tutor] While Loop?

2014-05-14 Thread Sam Ball
I'm attempting to create a program where the user inputs their account number (which must be 8 digits) and if what the user enters is not 8 digits in length I want python to tell the user this is invalid and then keep asking for the account number until a suitable number has been entered. I'm

[Tutor] for the error about 'import site' failed; use -v for traceback

2014-05-14 Thread Tao Zhu
Hi everyone, when I use python, the problem occured. when I used the command python -v, the results are listed as follows. could you tell me what wrong? $ python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/local/lib/python2.4/site.pyc matches

Re: [Tutor] While Loop?

2014-05-14 Thread Alan Gauld
On 14/05/14 10:45, Sam Ball wrote: I'm attempting to create a program where the user inputs their account number (which must be 8 digits) and if what the user enters is not 8 digits in length I want python to tell the user this is invalid and then keep asking for the account number until a

Re: [Tutor] While Loop?

2014-05-14 Thread Danny Yoo
On Wed, May 14, 2014 at 2:45 AM, Sam Ball sambal...@hotmail.com wrote: I'm attempting to create a program where the user inputs their account number (which must be 8 digits) and if what the user enters is not 8 digits in length I want python to tell the user this is invalid and then keep

Re: [Tutor] for the error about 'import site' failed; use -v for traceback

2014-05-14 Thread C Smith
That looks pretty normal. I don't see any errors. On Wed, May 14, 2014 at 5:42 AM, Tao Zhu zxl_...@126.com wrote: Hi everyone, when I use python, the problem occured. when I used the command python -v, the results are listed as follows. could you tell me what wrong? $ python -v # installing

Re: [Tutor] for the error about 'import site' failed; use -v for traceback

2014-05-14 Thread C Smith
What are you trying to do? On Wed, May 14, 2014 at 12:24 PM, C Smith illusiontechniq...@gmail.com wrote: That looks pretty normal. I don't see any errors. On Wed, May 14, 2014 at 5:42 AM, Tao Zhu zxl_...@126.com wrote: Hi everyone, when I use python, the problem occured. when I used the

[Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text

2014-05-14 Thread Charles Agriesti
Practical programming, 2nd Edition, Paul Gries, Jennifer Campbell, Jason Montojo (Python 3) P 184, the last half of chapter 10 requires the time_series module, which is no longer available, apparently replaced by Pandas. Looked into installing Pandas. Installing Anaconda is supposed to

Re: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text

2014-05-14 Thread Albert-Jan Roskam
From: Charles Agriesti dragrie...@comcast.net To: Tutor@python.org Sent: Wednesday, May 14, 2014 9:08 PM Subject: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text Practical programming, 2nd Edition,

Re: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text

2014-05-14 Thread Marc Tompkins
On Wed, May 14, 2014 at 12:08 PM, Charles Agriesti dragrie...@comcast.netwrote: Is this Anaconda thing any part of being able to run the scripts from the textbook with time_series? Is it a complete wild goose chase? First off - I know nothing about using Python in a scientific setting.

Re: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text

2014-05-14 Thread Jim Byrnes
On 05/14/2014 02:08 PM, Charles Agriesti wrote: Practical programming, 2nd Edition, Paul Gries, Jennifer Campbell, Jason Montojo (Python 3) P 184, the last half of chapter 10 requires the time_series module, which is no longer available, apparently replaced by Pandas. Read the first paragraph

Re: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text

2014-05-14 Thread Albert-Jan Roskam
- Original Message - From: Jim Byrnes jf_byr...@comcast.net To: tutor@python.org Cc: Sent: Wednesday, May 14, 2014 10:40 PM Subject: Re: [Tutor] substituting for time_series, Pandas, Anaconda. Practical Programming, intro Comp Sci, Gries text On 05/14/2014 02:08 PM, Charles

Re: [Tutor] While Loop?

2014-05-14 Thread Dave Angel
On 05/14/2014 05:45 AM, Sam Ball wrote: I'm attempting to create a program where the user inputs their account number (which must be 8 digits) and if what the user enters is not 8 digits in length I want python to tell the user this is invalid and then keep asking for the account number until

[Tutor] (no subject)

2014-05-14 Thread JEAN MICHEL
I'm a Python beginner trying write a program that reads outside txt files, takes the data like the name and test grades of students then calculate the average and also assigns a grade and writes the data into a new txt file. I'm having difficulties writing the program so far I've been able to

[Tutor] Translator - multiple choice answer

2014-05-14 Thread Mario Py
Hi all, my first post here and my first ever programing project! (actually stealing code from all over the internet for now) So please be easy on me hints probably will not work with me, I'm complete beginner... I'm trying to create something useful, small program which will help my wife to

Re: [Tutor] (no subject)

2014-05-14 Thread Alan Gauld
On 14/05/14 21:48, JEAN MICHEL wrote: I'm a Python beginner Welcome to the list. Please always include a subject line relating to your question. It makes searching the archives much easier! I'm having difficulties writing the program so far I've been able to write up half of the

Re: [Tutor] Translator - multiple choice answer

2014-05-14 Thread Danny Yoo
Program read TXT file (c:\\slo3.txt) In this file there are two words per line separated by tab. First word is foreign language and second word is proper translation, like this: pivobeer kruhbread rdeca red krompir potatoe hisahouse cesta road autocar (not even

Re: [Tutor] Translator - multiple choice answer

2014-05-14 Thread C Smith
This might be useful for reading values from a text value into a dictionary: https://stackoverflow.com/questions/17775273/how-to-read-and-store-values-from-a-text-file-into-a-dictionary-python On Wed, May 14, 2014 at 7:00 PM, Danny Yoo d...@hashcollision.org wrote: Program read TXT file

Re: [Tutor] (no subject)

2014-05-14 Thread Dave Angel
On 05/14/2014 04:48 PM, JEAN MICHEL wrote: I'm a Python beginner Welcome to python-tutor trying write a program that reads outside txt files, What's an outside txt file? And since you only one file, perhaps you left out the othertwo? takes the data like the name and test grades of

Re: [Tutor] (no subject)

2014-05-14 Thread Danny Yoo
if curraverage= 90: grade= A lettergrades.append(grade) else: if curraverage = 80 and curraverage 90: grade= B lettergrades.append(grade) else: if curraverage = 70 and

Re: [Tutor] (no subject)

2014-05-14 Thread Danny Yoo
On Wed, May 14, 2014 at 9:15 PM, Danny Yoo d...@hashcollision.org wrote: if curraverage= 90: grade= A lettergrades.append(grade) else: if curraverage = 80 and curraverage 90: grade= B

Re: [Tutor] (no subject)

2014-05-14 Thread Cameron Simpson
Before we begin, two etiquette requests: - please supply a meaningful subject line; it helps everyone keep track of the discussions; this one might have used something like help with simple grading problem - please see if your mailer (GMail?) can be told to send just plain text to this

Re: [Tutor] (no subject)

2014-05-14 Thread JEAN MICHEL
thank you for the all advice I really appreciate it. I probably wasn't wasn't too clear when i first sent my email asking for help, my apologies so let me better explain what i'm doing. I'm trying to write a program that reads 3 class data files such as period1.txt, period2.txt. Inside those