Re: [Tutor] for loop for long numbers

2015-08-04 Thread Dima Kulik
I want to ask user how many time he would like to make an iteration of crypt function. Also if he/she wants to do it numerous times, my code should work. So i use such code: x = input(How many time you want to encrypt?) for i in xrange(0,x+1):  make_code of course i can make rule to prevent

[Tutor] Question

2015-08-04 Thread Lulwa Bin Shuker
Dear Python tutor list ... I'm currently learning Python through an online course but after learning the basics of the language I need to apply what I learned on a real project and start practicing it. How can I do that ? Thanks, Lulwa Bin Shuker ___

Re: [Tutor] for loop for long numbers

2015-08-04 Thread Peter Otten
Dima Kulik wrote: I want to make a for loop with a huge numbers. for example: for i in range (0,90): some_code() but range and xrange cant operate with such big numbers. Can some on help me? If you are just beginning with Python and do not require any libraries that are only

Re: [Tutor] palindrome using stack and queue

2015-08-04 Thread Alan Gauld
On 04/08/15 04:55, Quiles, Stephanie wrote: i have to write a palindrome tester using a stack and a queue. Some teachers seem determined to force students to use basic data structures rather than use the features of the language appropriately. I think that's a stupid waste of time but if

Re: [Tutor] for loop for long numbers

2015-08-04 Thread Peter Otten
Peter Otten wrote: But note that if some_code() takes 1 microsecond the loop will run for about Sorry, that should be millisecond (1/1000 s). 90/60/60/24/1000 104.17 104 days. ___ Tutor maillist - Tutor@python.org To

[Tutor] palindrome using stack and queue

2015-08-04 Thread Quiles, Stephanie
Hello , i have to write a palindrome tester using a stack and a queue. You will need to handle strings that may have upper/lower case letters and white space between the letters. We will not include punctuation marks in our strings. Here’s an example: The user inputs otto, you read the string

Re: [Tutor] scratching my head

2015-08-04 Thread Emile van Sebille
On 8/3/2015 1:22 AM, Cameron Simpson wrote: That depends. This is the tutor list; we're helping Clayton debug his code as an aid to learning. While it's good to know about the facilities in the standard library, pointing him directly at fnmatch (which I'd entirely forgotten) is the give a man a

[Tutor] Plotting asymmetric error bars for a single point in matplotlib

2015-08-04 Thread Colin Ross
Hi all, Goal: To plot asymmetric x error bars for a single point using errorbar. I am interested in displaying the inter quartile range (IQR) for a data set. Code: import numpy as np import matplotlib.pyplot as plt y = 1.0 data = np.random.rand(100) median = np.median(data) upper_quartile =

Re: [Tutor] Question

2015-08-04 Thread Alan Gauld
On 04/08/15 05:21, Lulwa Bin Shuker wrote: I'm currently learning Python through an online course but after learning the basics of the language I need to apply what I learned on a real project and start practicing it. How can I do that ? Do you have a project in mind but are not sure how to

Re: [Tutor] scratching my head - still

2015-08-04 Thread Cameron Simpson
On 05Aug2015 12:46, Steven D'Aprano st...@pearwood.info wrote: On Tue, Aug 04, 2015 at 05:52:15PM -0700, Clayton Kirkwood wrote: As seen below (closely), some filenames are not being removed while others are, such as in the first stanza, some pdfs are removed, some aren't. In the second stanza,

Re: [Tutor] scratching my head - still

2015-08-04 Thread Clayton Kirkwood
As seen below (closely), some filenames are not being removed while others are, such as in the first stanza, some pdfs are removed, some aren't. In the second stanza, Thumbs.db makes it through, but was caught in the first stanza. (Thanks for those who have proffered solutions to date!) I see no

Re: [Tutor] Schechter Function in python

2015-08-04 Thread Emile van Sebille
On 8/4/2015 3:16 PM, Michael Roberts via Tutor wrote: I'm having a few problems defining a Schecter function in python. Without going into too much detail I need to add a +0j factor for matplotlib to plot the function in real and imaginary space. I know that this is not what should be

Re: [Tutor] find pickle and retrieve saved data

2015-08-04 Thread Quiles, Stephanie
I am still struggling with this one. Here is my code to retrieve data from emails.dat file def main(): found = False search = input(Enter a name in the file for info: ) infile = open(emails.dat, r) name = infile.readline() while name != '': email1, email2, phone,

[Tutor] About Python Module to Process Bytes

2015-08-04 Thread Michelle Meiduo Wu
Hi there, I'd like to find some python module to easily process bytes array data, like encoding different types of data (char, long, short, float, etc) into a same bytes array. I checked Python built-in library and there are bytes and bytearray types which don't provide enough functions for

[Tutor] You are right.

2015-08-04 Thread Ali Moradi
About the listbox from sqlite, yes you are right, i'm beginner in python, and i watched many videos and study books, but i can't write what i want to :(, i mean i know the python basics (like data structures and...), i know tkinter basics and how to write widgets, but i don't know how to relate

Re: [Tutor] About Python Module to Process Bytes

2015-08-04 Thread Jerry Hill
On Tue, Aug 4, 2015 at 12:26 PM, Michelle Meiduo Wu wum...@hotmail.com wrote: Hi there, I'd like to find some python module to easily process bytes array data, like encoding different types of data (char, long, short, float, etc) into a same bytes array. I checked Python built-in library and

Re: [Tutor] About Python Module to Process Bytes

2015-08-04 Thread Danny Yoo
On Tue, Aug 4, 2015 at 9:26 AM, Michelle Meiduo Wu wum...@hotmail.com wrote: Hi there, I'd like to find some python module to easily process bytes array data, like encoding different types of data (char, long, short, float, etc) into a same bytes array. I checked Python built-in library and

Re: [Tutor] You are right.

2015-08-04 Thread Alan Gauld
On 04/08/15 10:22, Ali Moradi wrote: About the listbox from sqlite, yes you are right, i'm beginner in python, and i watched many videos and study books, but i can't write what i want to :(, i mean i know the python basics (like data structures and...), i know tkinter basics and how to write

Re: [Tutor] About Python Module to Process Bytes

2015-08-04 Thread Steven D'Aprano
On Tue, Aug 04, 2015 at 12:26:16PM -0400, Michelle Meiduo Wu wrote: Hi there, I'd like to find some python module to easily process bytes array data, like encoding different types of data (char, long, short, float, etc) into a same bytes array. I checked Python built-in library and there

Re: [Tutor] scratching my head - still

2015-08-04 Thread Steven D'Aprano
On Tue, Aug 04, 2015 at 05:52:15PM -0700, Clayton Kirkwood wrote: As seen below (closely), some filenames are not being removed while others are, such as in the first stanza, some pdfs are removed, some aren't. In the second stanza, Thumbs.db makes it through, but was caught in the first

Re: [Tutor] find pickle and retrieve saved data

2015-08-04 Thread Alan Gauld
On 04/08/15 23:09, Quiles, Stephanie wrote: def main(): found = False search = input(Enter a name in the file for info: ) infile = open(emails.dat, r) name = infile.readline() while name != '': email1, email2, phone, phone2 = (infile.readline()) name