Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Abdur-Rahmaan Janhangeer
XD that will help in the future, yes it was not unreadable this one. Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription option

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Steven D'Aprano
On Tue, Feb 26, 2019 at 01:34:33PM -0700, shaef...@q.com wrote: > I am learning python. I wanted to test my ability by making a program to > keep track of the flip of a coin to find how many consecutive times it came > up heads and tails. Here's how to count the number of times it comes up heads

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Alan Gauld via Tutor
On 27/02/2019 09:35, Abdur-Rahmaan Janhangeer wrote: > maybe try dpaste.de or something like that for code pasting ^^_ That can be useful if it's very long code but this is actually quite a short program and it's much easier to reply to if the code is in the message so I think the OP did the right

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Abdur-Rahmaan Janhangeer
maybe try dpaste.de or something like that for code pasting ^^_ Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: ht

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-26 Thread Alan Gauld via Tutor
On 26/02/2019 20:34, shaef...@q.com wrote: > I am learning python. I assume you are coming from some other language? If not you have managed to come up with the most convoluted and un-pythonic way imaginable to do a fairly simple task! > I wanted to test my ability by making a program to > keep

Re: [Tutor] I need help with my project

2018-12-03 Thread Treyton Hendrix
Awesome! Thanks to your help, I finally got my program done. Click here if you want to see it! > On Fri, Nov 30, 2018 at 5:14 PM Cameron Simpson wrote: > Avi and Alan and Sibylle, you're making this a bit hard on the OP > (Treyton). > > Yes he's supplied no context, but it is easy to make so

Re: [Tutor] I need help with my project

2018-11-30 Thread Cameron Simpson
Avi and Alan and Sibylle, you're making this a bit hard on the OP (Treyton). Yes he's supplied no context, but it is easy to make some suggestions. Each of yours suggests he design a much wider system (menu entry, web interface, some kind of GUI). All of which is (a) beyond him and (b) irrel

Re: [Tutor] I need help with my project

2018-11-28 Thread Avi Gross
I suggest starting at the beginning when asking a question to people who have no way of knowing what you have not told them. Your sentence is completely in middle or even near the end of something that has to be larger: " If the user selected a sandwich, french fries, and a beverage, reduce the to

Re: [Tutor] I need help with my project

2018-11-28 Thread Alan Gauld via Tutor
On 28/11/2018 00:30, Treyton Hendrix wrote: > If the user selected a sandwich, french fries, and a beverage, reduce the > total cost of the order by $1.00. > > This is what I have to do and I don't know where to start. Neither do we because we don't know what you are talking about. There is no co

Re: [Tutor] I need help with my project

2018-11-28 Thread Bob Gailer
On Nov 28, 2018 3:43 AM, "Treyton Hendrix" <2hendri...@stu.bps-ok.org> wrote: > > If the user selected a sandwich, french fries, and a beverage, reduce the > total cost of the order by $1.00. > > This is what I have to do and I don't know where to start. You start by learning how to ask effective

Re: [Tutor] I need help with my project

2018-11-28 Thread Sibylle Koczian
Am 28.11.2018 um 01:30 schrieb Treyton Hendrix: If the user selected a sandwich, french fries, and a beverage, reduce the total cost of the order by $1.00. This is what I have to do and I don't know where to start. Well, you are lucky. I just had my first mind-reading lesson today, you are my

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Roger B. Atkins
What about installing or reinstalling Django using the python version that produced the error message? On Mon, Nov 12, 2018 at 10:10 AM Matthew Ngaha wrote: > > On Mon, Nov 12, 2018 at 3:31 PM Mats Wichmann wrote: > > > > Reconstruct the virtualenv you want maybe? Their whole concept is that > >

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Matthew Ngaha
On Mon, Nov 12, 2018 at 5:52 PM Mats Wichmann wrote: > but the real message is that it couldn't > find necessary Django pieces in the python environment (this is > consistent with your original message, suggesting it found and is > running manage, but other things are missing). > You're right, I w

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Matthew Ngaha
On Mon, Nov 12, 2018 at 5:35 PM Roger B. Atkins wrote: > > What about installing or reinstalling Django using the python version > that produced the error message? Yeah if all else fails I'll try this. Thanks. ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Mats Wichmann
On 11/12/18 10:07 AM, Matthew Ngaha wrote: > On Mon, Nov 12, 2018 at 3:31 PM Mats Wichmann wrote: >> >> Reconstruct the virtualenv you want maybe? Their whole concept is that >> they're cheap and easy and can just be thrown away. Of course, you then >> have to remember what you did to create it i

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Matthew Ngaha
On Mon, Nov 12, 2018 at 3:31 PM Mats Wichmann wrote: > > Reconstruct the virtualenv you want maybe? Their whole concept is that > they're cheap and easy and can just be thrown away. Of course, you then > have to remember what you did to create it in order to make a new one... It's been 3 years,

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Mats Wichmann
On 11/12/18 4:45 AM, Matthew Ngaha wrote: > I haven't coded in about 3 years and I used to use Python3.4 on > openSUSE13.1. I had a virtual environment with this Python for a > development Django website. Before I stopped coding, I upgraded to > Python3.5, but everything still worked if I remember

Re: [Tutor] I found the octal and hexadecimal direct conversion method

2018-09-02 Thread Alan Gauld via Tutor
On 02/09/18 14:27, kanzan wrote: > ☻ I found direct method of octal and hexadecimal conversions ☻ (without > using binary or decimal) I'm not sure what you mean but numbertheory has been around for along time and has long had methods to convert from one base to another (not just computer bases but

Re: [Tutor] I get an error while search in my Entry field

2018-06-18 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 17/06/18 23:59, Ali M wrote: > >> def update_list(self): >> search_term = self.search_var.get() >> self.listbox.delete(0, tk.END) >> for item in self.listbox: > > The above pair of lines look odd. > You delete everything on the listbox

Re: [Tutor] I get an error while search in my Entry field

2018-06-18 Thread Alan Gauld via Tutor
On 17/06/18 23:59, Ali M wrote: > def update_list(self): > search_term = self.search_var.get() > self.listbox.delete(0, tk.END) > for item in self.listbox: The above pair of lines look odd. You delete everything on the listbox then try to iterate over it? Is that reall

Re: [Tutor] i really need help

2018-05-30 Thread Abdur-Rahmaan Janhangeer
did you attach a screenshot? if so i think it did not reach us ! Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Wed, 30 May 2018, 20:11 erich callahana, wrote: > > > I need to know how to access the window where in the menu at the top it > says run and that’s where I can test my

Re: [Tutor] i really need help

2018-05-30 Thread Brian Lockwood
If you only have the command line. Use the command line to navigate the folder where your script is. Then use the command python Followed by your scrutiny On Wed, 30 May 2018 at 17:13, erich callahana wrote: > > > I need to know how to access the window where in the menu at the top it > says r

Re: [Tutor] i really need help

2018-05-30 Thread Alan Gauld via Tutor
On 30/05/18 11:09, erich callahana wrote: > I need to know how to access the window where > in the menu at the top it > says run You need to help us out here. What program are you running or trying to run that has this Window? It sounds like an IDE of some kind, maybe IDLE? But most IDEs have a

Re: [Tutor] I have a problem with def

2018-02-23 Thread john fabiani
I don't what you are doing but it should be at least def func(): notice the colon at the end. Johnf On 02/22/2018 02:16 PM, David Bauer wrote: it doesn't work, you are suppsed to declare a function as def func() and it comes back as: File "", line 1 def func() ^ SyntaxEr

Re: [Tutor] I have a problem with def

2018-02-23 Thread Bob Gailer
On Feb 23, 2018 3:58 AM, "David Bauer" wrote: > > it doesn't work, you are suppsed to declare a function as def func() and it > comes back as: > > File "", line 1 > def func() > ^ > SyntaxError: invalid syntax > > that is not expected I would also expect def to turn red because it

Re: [Tutor] I have a problem with def

2018-02-23 Thread Mark Lawrence
On 22/02/18 22:16, David Bauer wrote: it doesn't work, you are suppsed to declare a function as def func() and it comes back as: File "", line 1 def func() ^ SyntaxError: invalid syntax that is not expected I would also expect def to turn red because it is a keyword in Python

Re: [Tutor] I am trying to create a list of object and want to display that list on the screen on my Tkinter screen

2017-10-04 Thread Alan Gauld via Tutor
On 04/10/17 14:40, edmundo pierre via Tutor wrote: > Hello, > I am writing a code When posting code please use plain text. HTML gets mangled so we can't see what your code looks like.(see below) > where I am using a empty list and I will fill up that > list with object. Then  I will show those

Re: [Tutor] I want to learn how memory works!

2017-09-29 Thread Alan Gauld via Tutor
On 29/09/17 19:47, Michael C wrote: > Could you point me to a source of information about all the things someone > should know before he starts writing a memory scanner? Not a single source but wikipedia is a good start for anything technical. In particular you need to understand the difference

Re: [Tutor] I have a problem

2017-09-23 Thread Mats Wichmann
On 09/23/2017 03:46 AM, Sibylle Koczian wrote: > Am 22.09.2017 um 23:41 schrieb Mizav: >> You are using pip version 7.1.2, however version 9.0.1 is available. >> You should consider upgrading via the 'python -m pip install --upgrade >> pip' >> command. >> > > And what is the problem? Did you under

Re: [Tutor] I have a problem

2017-09-23 Thread Sibylle Koczian
Am 22.09.2017 um 23:41 schrieb Mizav: You are using pip version 7.1.2, however version 9.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. And what is the problem? Did you understand the message? Did you try to do the upgrade and what happe

Re: [Tutor] I can not display the answer of the Limit when I click the Button Answer.

2017-09-13 Thread Mats Wichmann
On 09/13/2017 09:03 AM, edmundo pierre via Tutor wrote: >                                                            That is my code > below. I used tkinter to calculate the limit of a function. I used Grid > geometry, but when I click the button Answer, but nothing comes out so I do > not know

Re: [Tutor] I want to display Integral symbols

2017-09-05 Thread Alan Gauld via Tutor
On 05/09/17 14:29, edmundo pierre via Tutor wrote: > I have been trying to display mathematics symbols on my Tkinter (using > Python) project, > but was not successful So show us what you did. Its hard to figure out what's gone wrong when we can't see your code. And that includes telling us wh

Re: [Tutor] I hope you can build a platform for studying in Traditional Chinese.Please

2017-01-29 Thread boB Stepp
Hello! On Sun, Jan 29, 2017 at 12:31 PM, 劉權陞 <01patrick...@gmail.com> wrote: > Hello: I am the student in junior high school.I would like to learn python, > but there are few traditional Chinese resources on the website, especially > the Python's documents are all in English I can not read it.( >

Re: [Tutor] I download package and it says computer is missing this file, how do I fix?

2016-12-23 Thread Alan Gauld via Tutor
On 23/12/16 01:47, Don Pryor wrote: > [image: Inline image 1] > This is a text mailing list so the server strips out most attachments. You need to tell us a lot more. 1) What package are you trying to install 2) How are you downloading/installing it(pip/ftp/binary installer?) 3) Which OS and Pytho

Re: [Tutor] I Need Help

2016-08-24 Thread Steven D'Aprano
On Wed, Aug 24, 2016 at 11:26:07AM +0100, Micheal Emeagi wrote: > yt = [1,2,3,4,5,6] > ft = [yt[0],yt[0]] > alpha = 0.5 > while len(ft) != len(yt) + 1: > ft.append(ft[1] + alpha * (yt[1] - ft[1])) > print(ft) > ft[1] += 1 > yt[1] += 1 > > print (ft) I think that your intention is

Re: [Tutor] I Need Help

2016-08-24 Thread Alan Gauld via Tutor
On 24/08/16 19:12, Micheal Emeagi wrote: > This is what it is suppose to be > [1, 1, 1.5, 2.25, 3.125, 4.06, 5.03] Oh good, it looks like my wild guess was right. :-) enjoy, -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow

Re: [Tutor] I Need Help

2016-08-24 Thread Micheal Emeagi
This is what it is suppose to be [1, 1, 1.5] [1, 1, 1.5, 2.25] [1, 1, 1.5, 2.25, 3.125] [1, 1, 1.5, 2.25, 3.125, 4.06] [1, 1, 1.5, 2.25, 3.125, 4.06, 5.03] The model below is what I want to implement.I chose alpha to be 0.5. The model below chose 0.3. What is Exponential Smoothing? - A typ

Re: [Tutor] I Need Help

2016-08-24 Thread Joaquin Alzola
>I want the elements of ft to increment by one while I use it to generate the >subsequent element. But for some reasons I don't understand, it keeps changing >the second element in Ft. >yt = [1,2,3,4,5,6] >ft = [yt[0],yt[0]] >alpha = 0.5 >while len(ft) != len(yt) + 1: >ft.append(ft[1] + al

Re: [Tutor] I Need Help

2016-08-24 Thread Alan Gauld via Tutor
On 24/08/16 11:26, Micheal Emeagi wrote: > forcast values. Ft is the forcast list whose length should be one element > greater than the Yt list. I want the elements of ft to increment by one > while I use it to generate the subsequent element. But for some reasons I > don't understand, it keeps ch

Re: [Tutor] I want to share a source that i wrote

2016-01-15 Thread Alan Gauld
On 15/01/16 01:11, Ricardo Martínez wrote: > Hi guys, i wrote a simply MySQL interpretar with Python / Tk and I want to > ask if can I share with the people in the list to discuss about the code > and maybe help to the community. > > The source code has 200 lines and is written in a single file.

Re: [Tutor] I don't understand why this program is said to be "not defined" when I test it.

2015-10-17 Thread Bob Gailer
Also: Briefly describe problem 22 Show us what you did to test the program It would be better to test for integer before doing a numeric comparison There is no need ever to compare a boolean expression to true or false. All you need is either if condition or if not condition. A good short cut for a

Re: [Tutor] I don't understand why this program is said to be "not defined" when I test it.

2015-10-16 Thread Alan Gauld
On 16/10/15 23:31, zak nelson wrote: I don't understand why this program is said to be "not defined" when I test it. In future please be more precise in describing the problem, and that means including the full error message in the post. It contains a lot of useful information. I'm guessing it

Re: [Tutor] I need help with my homework. No, really....

2015-07-29 Thread Steven D'Aprano
Part 3... On Wed, Jul 29, 2015 at 04:16:58AM -0500, Lissa Hopson wrote: > following: > > 1. Load array x column-wise and array y row-wise > 2. Multiply x by y to compute array z > 3. Compute the sum of all elements in column 2 of array x and add it to the > sum of all elements in row 2 of y (the

Re: [Tutor] I need help with my homework. No, really....

2015-07-29 Thread Steven D'Aprano
Part 2... On Wed, Jul 29, 2015 at 04:16:58AM -0500, Lissa Hopson wrote: > Given x as an array of [5,3] and y as an array of [3,7] perform the > following: > > 1. Load array x column-wise and array y row-wise > 2. Multiply x by y to compute array z > 3. Compute the sum of all elements in column 2

Re: [Tutor] I need help with my homework. No, really....

2015-07-29 Thread Steven D'Aprano
On Wed, Jul 29, 2015 at 04:16:58AM -0500, Lissa Hopson wrote: > I'm taking a beginning Python course at Austin Community College. I'm also > taking two other project-based web programming courses. It's summer > semester, meaning we have eight weeks instead of the usual 16 to finish all > the requir

Re: [Tutor] I am trying to get my encryption program to print from my def main. I am just learning the program.

2015-05-01 Thread Alan Gauld
On 01/05/15 11:48, Corneil Lionel wrote: text_list=[] temp=[] import allison import corneil def main(): choice=input("Would you like to begin? y/n: ") while choice!='n': d=cipher() alphabet=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V

Re: [Tutor] I apologize

2014-11-16 Thread Alan Gauld
On 16/11/14 04:06, Crush wrote: Below was the post that was sent from the wrong email. Not sure if the first post went through, so in the event it did not, I will post again; if it was posted twice, I apologize for the redundancy. The original got through without appearing in the moderation que

Re: [Tutor] I apologize

2014-11-15 Thread Crush
Below was the post that was sent from the wrong email. Not sure if the first post went through, so in the event it did not, I will post again; if it was posted twice, I apologize for the redundancy. Subject: Re: Help understanding classes Thank you Alan and Danny. It amazes me at the lengths y

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread wesley chun
I'm not going to add too much more to all the replies here already, but one of my students did record a quick <6-minute video in one of my courses where i explained generators. hopefully you find it useful! It's about halfway down the page at http://cyberwebconsulting.com. (Also for those learning

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Hilton Fernandes
Dear all, i'd like to thank every answer in this list. Alan Gauld is a fine writer of excellent introductory material on Pyton, and so are a few other members of this list. So, it is always enlightening to read what you all write. Keep up the good work. All the best, hilton On Wed, May 28, 20

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Alan Gauld
On 28/05/14 11:52, Degreat Yartey wrote: This means that '...' should generally contain a manipulator then yield generates from where it stopped...*getting it* It would help if you deleted the irrelevent bits so we can see which '...' you mean. I'm guessing it was this comment, right at the

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Degreat Yartey
This means that '...' should generally contain a manipulator then yield generates from where it stopped...*getting it* Thanks for the explanation though! Its seems so simple to digest. Thank you... On May 28, 2014 1:09 AM, "Danny Yoo" wrote: > On Tue, May 27, 2014 at 12:27 PM, Degreat Yartey >

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Degreat Yartey
I am completely new to programming! On May 27, 2014 10:54 PM, "R. Alan Monroe" wrote: > > I need an explanation so simple as using the expression 'print ()', in > this case 'yield'. > > Python 2.6 here! > > Ever write any C programs with static variables? Generators can be > explained in those te

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Degreat Yartey
I really love this explanation... that means functions just run till it finishes its duty, then return...and generators just generate one at a time until the 'for' statement asks for __next__(). On May 28, 2014 8:37 AM, "Cameron Simpson" wrote: > On 27May2014 15:27, Degreat Yartey wrote: > >> I

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-28 Thread Cameron Simpson
On 27May2014 15:27, Degreat Yartey wrote: I am studying python on my own (i.e. i am between the beginner and intermediate level) and i haven't met any difficulty until i reached the topic 'Generators and Iterators'. I need an explanation so simple as using the expression 'print ()', in this case

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-27 Thread Marc Tompkins
On Tue, May 27, 2014 at 12:27 PM, Degreat Yartey wrote: > I am studying python on my own (i.e. i am between the beginner and > intermediate level) and i haven't met any difficulty until i reached the > topic 'Generators and Iterators'. > I need an explanation so simple as using the expression 'pri

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-27 Thread Danny Yoo
On Tue, May 27, 2014 at 12:27 PM, Degreat Yartey wrote: > I am studying python on my own (i.e. i am between the beginner and > intermediate level) and i haven't met any difficulty until i reached the > topic 'Generators and Iterators'. > I need an explanation so simple as using the expression 'pri

Re: [Tutor] I am having difficulty grasping 'generators'

2014-05-27 Thread R. Alan Monroe
> I need an explanation so simple as using the expression 'print ()', in this > case 'yield'. > Python 2.6 here! Ever write any C programs with static variables? Generators can be explained in those terms if you have experience with them. Alan ___ Tut

Re: [Tutor] i dont understand this code

2014-02-24 Thread Danny Yoo
It's also a bit unreasonable to ask us to reverse-engineer code that is orginally CRC-16 code. Whoever you got this code from is violating the GPL by stripping out the comments or the COPYRIGHT license from the original sources. This is perhaps unintentional. Please ask them to correct the probl

Re: [Tutor] I can't understand where python class methods come from

2014-02-24 Thread voger
Thank you all for your responses. My first post on the list an I already got more than I asked for. :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I can't understand where python class methods come from

2014-02-24 Thread spir
On 02/23/2014 10:59 PM, voger wrote: I have a really hard time understanding where methods are defined in python classes. My first contact with programming was with C++ and Java and even if I was messing with them in a very amateurish level, I could find where each class was defined and what meth

Re: [Tutor] I can't understand where python class methods come from

2014-02-23 Thread James Scholes
voger wrote: > Some properties I can see them defined but some others like > sublocality or administrative_area_level_1 I don't see them defined > anywhere. Also in the comments in the source code the author says > > #You can also choose a different property to display for each lookup > #type. #

Re: [Tutor] I can't understand where python class methods come from

2014-02-23 Thread Alan Gauld
On 23/02/14 21:59, voger wrote: I have a really hard time understanding where methods are defined in python classes. My first contact with programming was with C++ and Java Ben has already addressed much of your confusion. I'd just add that if you look at C++ operator overloading it is very si

Re: [Tutor] I can't understand where python class methods come from

2014-02-23 Thread Ben Finney
voger writes: > I have a really hard time understanding where methods are defined in > python classes. Reading the rest of your message, I think you're saying that you can't locate *which* class defines a method > […] With python everything looks like magic. It can seem that way. Fortunately,

Re: [Tutor] i dont understand this code

2014-02-22 Thread Alan Gauld
On 22/02/14 12:26, piyush joshi wrote: Can anyone help me out in understanding this code Sure, but it's an quite a lot of code to describe line by line. Is there anything specific you need help with? import os rotationMatrix1 = [7, 1, 5, 3, 0, 6, 2, 5, 2, 3, 0, 6, 1, 7, 6, 1, 5, 2, 7, 1, 0,

Re: [Tutor] i dont understand this code

2014-02-22 Thread bob gailer
On 2/22/2014 7:26 AM, piyush joshi wrote: Can anyone help me out in understanding this code Your question is kinda vague. Exactly what do you not understand? # import os rotationMatrix1 = [7, 1, 5, 3, 0, 6, 2, 5, 2, 3, 0, 6, 1, 7, 6, 1, 5, 2, 7, 1, 0, 3, 7, 6, 1, 0, 5, 2, 1, 5, 7, 3, 2, 0

Re: [Tutor] I am teaching my students Python the second semester using www.LearnStreet.com ( http://www.learnstreet.com/ ). I am in need of some help. I am having a problem with the Lists-Set 1 exerci

2014-02-04 Thread Danny Yoo
On Tue, Feb 4, 2014 at 11:31 AM, Thomas Maher wrote: > Thank you for helping me. I used a similar code, but with an if statement. > if list1 in list2: > return len(list2[-1]) > > This is the code they sent me this morning. > > def len_of_innerlist(list2): > for ele in list2: > if isinstance(e

Re: [Tutor] I am teaching my students Python the second semester using www.LearnStreet.com ( http://www.learnstreet.com/ ). I am in need of some help. I am having a problem with the Lists-Set 1 exerci

2014-02-04 Thread Danny Yoo
The question as stated is fairly artificial and a bit nonsensical. Let me explain that statement, because it's a strong one. If we know the exact shape for list1 and list2 are, we can answer this question directly, without loops. len(list1[-1]) "Take the last element of the list1, and grab i

Re: [Tutor] I am teaching my students Python the second semester using www.LearnStreet.com ( http://www.learnstreet.com/ ). I am in need of some help. I am having a problem with the Lists-Set 1 exerci

2014-02-04 Thread Peter Otten
Thomas Maher wrote: > I am teaching my students Python the second semester using > www.LearnStreet.com ( http://www.learnstreet.com/ ). I am in need of some > help. I am having a problem with the Lists-Set 1 exercise 18. The > problem is below. I have put in several codes and the output is 5,

Re: [Tutor] i installed the package statsmodels but i get an error when i use it

2013-12-16 Thread Don Jennings
On Dec 16, 2013, at 11:56 AM, eva maria gualandi wrote: > Good afternoon, > I installed from https://pypi.python.org/pypi/statsmodels the package > statsmodels for python 2.7 (32bit) , i have to do some test statistics for a > time series analysis that i can find under statsmodels.tsa. In part

Re: [Tutor] i installed the package statsmodels but i get an error when i use it

2013-12-16 Thread Derry, James R
hi, eva, when i ran your code i found a misspell: result = statsmodels.tsa.statools.adfuller(x,1) when i fixed 'stattools' -- result = statsmodels.tsa.stattools.adfuller(x,1) print result (-2.6825663173365015, 0.077103947319183241, 0, 7, {'5%': -3.4775828571428571, '1%': -4.9386902332361515, '

Re: [Tutor] i installed the package statsmodels but i get an error when i use it

2013-12-16 Thread Alan Gauld
On 16/12/13 16:56, eva maria gualandi wrote: ) i run this simple programm import numpy as np import statsmodels from statsmodels.tsa import stattools x = np.array([1,2,3,4,3,4,2,3]) result = statsmodels.tsa.statools.adfuller(x,1) Since you explicitly imported stattools you only need to cal

Re: [Tutor] i installed the package statsmodels but i get an error when i use it

2013-12-16 Thread Steven D'Aprano
Hello Eva, On Mon, Dec 16, 2013 at 05:56:36PM +0100, eva maria gualandi wrote: [...] > but unfortunately i get the following error message: > > Traceback (most recent call last): > File "C:\Python27\esempio_adftest.py", line 3, in > from statsmodels.tsa import stattools [...] > from pa

Re: [Tutor] I need help with the following question

2013-09-10 Thread Dino Bektešević
> Message: 3 > Date: Tue, 10 Sep 2013 09:58:31 +0200 > From: Thabile Rampa > To: tutor@python.org > Subject: [Tutor] [Re:] I need help with the following question > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > On Aug 27, 2013, at 3:40 AM, isaac Eric wrote > > > > pr

Re: [Tutor] i need help with the following question

2013-08-27 Thread Don Jennings
On Aug 27, 2013, at 3:40 AM, isaac Eric wrote: > print "For a circle of radius %s the area is %s" % (radius,area) > Question: What is the purpose of %s ? Okay, so you're just getting started with python. We're happy to do some hand-holding, but we encourage you to think first. You've follow

Re: [Tutor] i need help with the following question

2013-08-26 Thread Alan Gauld
On 26/08/13 19:31, Joel Goldstick wrote: ___ From: JAMIE shelley To: Alan Gauld effectively just a knowledge base but one that can change the area of it's specialization. So, the original question about ways to output from python has nothing to do with your questions now? The proble

Re: [Tutor] i need help with the following question

2013-08-26 Thread Joel Goldstick
Author of the Learn To Program website > http://www.alan-g.me.uk/ > > ________ > From: JAMIE shelley > To: Alan Gauld > Sent: Monday, 26 August 2013, 18:47 > Subject: RE: [Tutor] i need help with the following question > > hello, not sure id thi

Re: [Tutor] i need help with the following question

2013-08-26 Thread ALAN GAULD
you  will need to figure out how. It's unlikely to be a  trivial exercise.   Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ > > From: JAMIE shelley >To: Alan Gauld >Sent: Monday, 26 August 2013, 18:47 >Subject: RE:

Re: [Tutor] i need help with the following question

2013-08-26 Thread Alan Gauld
On 26/08/13 09:29, isaac Eric wrote: describe different ways of displaying output using python! This smells like homework. We don;t do your homework for you although we will try to point you in the right direction. But you need to show that you are at least trying to figure it out for yourself.

Re: [Tutor] i need help with the following question

2013-08-26 Thread bob gailer
On 8/26/2013 4:29 AM, isaac Eric wrote: describe different ways of displaying output using python! I am glad you are asking for help. We encourage that. I agree with the other responses. Your question is clear to you, but not to us. We could play the guessing game and eventually discover what

Re: [Tutor] i need help with the following question

2013-08-26 Thread Chris Down
On 2013-08-26 01:29, isaac Eric wrote: > describe different ways of displaying output using python! Please, read this: http://www.catb.org/esr/faqs/smart-questions.html pgpmEMqlTiuCa.pgp Description: PGP signature ___ Tutor maillist - Tutor@python.or

Re: [Tutor] i need help with the following question

2013-08-26 Thread Don Jennings
On Aug 26, 2013, at 4:29 AM, isaac Eric wrote: > describe different ways of displaying output using python! Well, that's not really a question now, is it? I would be happy to help, but which part of the task is confusing for you? Take care, Don ___

Re: [Tutor] I have download python 3.3, then I click the link of Module Docs, but nothing appears

2013-08-20 Thread Jerry Hill
You don't give much context for your question, so I'm going to guess. You installed Python 3.3 on windows, and it installed some links in your start menu. One of those links is titled "Module Docs", and clicking on it doesn't do anything. Is that right? That seems to be the case for me too, thou

Re: [Tutor] I need a good resource for python Django

2013-08-20 Thread Jared Nielsen
> Hi, > > Can anyone suggest me a good resource for python Django. I've gone through > the official website of Django but it is of limited use to me. Any help on > this would be highly appreciated. I recommend Mike Hibbert's YouTube series on Django. http://www.youtube.com/watch?v=oT1A1KKf0SI&fea

Re: [Tutor] I need a good resource for python Django

2013-08-19 Thread Russel Winder
On Sat, 2013-08-17 at 21:29 +0530, Arun Kumar wrote: > Hi, > > Can anyone suggest me a good resource for python Django. I've gone through > the official website of Django but it is of limited use to me. Any help on > this would be highly appreciated. You have given no indication as to why you con

Re: [Tutor] I need a good resource for python Django

2013-08-18 Thread Tanmaya Meher
hey Arun ! U can check the below sites: 1. https://code.djangoproject.com/wiki/Tutorials (u will get lots of tuts and examples to do) 2. http://lightbird.net/dbe/ (Teaches by examples, A very good tut) 3. https://www.udemy.com/full-django-tutorial/ (complete video tuts from django developer) 4.

Re: [Tutor] I need a good resource for python Django

2013-08-17 Thread Savla, Haem
I am a fucking douchebag! I like beating up my girlfriend. On Saturday, August 17, 2013, Joel Goldstick wrote: > On Sat, Aug 17, 2013 at 11:59 AM, Arun Kumar > > > wrote: > > Hi, > > > > Can anyone suggest me a good resource for python Django. I've gone > through > > the official website of Djan

Re: [Tutor] I think I found what I'm looking for.

2013-06-03 Thread David Robinow
On Mon, Jun 3, 2013 at 7:32 PM, Michael Sparks wrote: > speech.py is a Python module that provides a clean interface to Windows's > voice recognition and text-to-speech capabilities. But it requires Windows > XP or Vista, and Python 2.4 or 2.5. I use Windows 7. > ... > I think that I'm satisfied w

Re: [Tutor] I cant fix this bug

2012-12-18 Thread bob gailer
On 12/18/2012 8:05 PM, Gina wrote: print(menu_quad()) menu_quad() calls that function which prints the quadrilateral menu. The function has no return statement, so by default it returns None. The above print then prints None. Change menu_quad() to return rather than print the menu. BTW you r

Re: [Tutor] I cant fix this bug

2012-12-18 Thread Mitya Sirenef
On 12/18/2012 08:05 PM, Gina wrote: I have Python version 3. when the program begins, it prints out the main menu and then asks you for your choice - just like it is supposed to you enter your choice, and the next menu pops up, and below the menu it says "None" on the line before your next choi

Re: [Tutor] I cant fix this bug

2012-12-18 Thread Oscar Benjamin
On 19 December 2012 01:05, Gina wrote: > I have Python version 3. > when the program begins, it prints out the main menu and then asks you for > your choice - just like it is supposed to > you enter your choice, and the next menu pops up, and below the menu it says > "None" on the line before your

Re: [Tutor] I am learning python3 and would like some more python3 modules/programs on my...

2012-10-15 Thread Wayne Werner
On Tue, 9 Oct 2012, Prasad, Ramit wrote: You can even think about switching later if necessary. Although, it is probably easier to go from 2 to 3 due to the existence of automated conversion tools. There is actually a python 3to2.py script now. And if you pick up Python 3 you'll have much le

Re: [Tutor] I am learning python3 and would like some more python3 modules/programs on my...

2012-10-09 Thread Prasad, Ramit
frank ernest wrote: > version python3.2 linux > I am learning python3 and would like some more python3 modules/programs on my > computer to look at and work with > to learn more about python3. I have read the tutorial and some of the > complete language reference. I can't tell > from the package

Re: [Tutor] I Need Help With Using Tkinter/Console/Creating GUIs

2012-10-05 Thread tayo rotimi
Thank you Steven; I am now running. I just followed your hint. I later noticed the author was actually referring to an earlier version of Python, with the console not looking the same with Python 3.2.  Regards. Tayo.___ Tutor maillist - Tutor@python

Re: [Tutor] I Need Help With Using Tkinter/Console/Creating GUIs

2012-10-04 Thread Steven D'Aprano
On 05/10/12 07:30, tayo rotimi wrote: Hi, I recently started learning as a python programming 'absolute beginner'. I have Python 3.2 installed on my laptop, and I have learned to a point where I need to create GUIs. I understand from the text book I am reading that all I need to have access t

Re: [Tutor] I don't know why this program doesn't run

2012-09-21 Thread Gina
Thank you so much! That worked! On 9/21/2012 7:17 PM, Dave Angel wrote: Hi, you forgot to do a reply-all, so it didn't go to the list. I'm correcting that now, so don't worry about it. if your email doesn't support reply-all, then just add a cc of tutor@python.org On 09/21/2012 08:09 PM, Gi

Re: [Tutor] I don't know why this program doesn't run

2012-09-21 Thread Dave Angel
Hi, you forgot to do a reply-all, so it didn't go to the list. I'm correcting that now, so don't worry about it. if your email doesn't support reply-all, then just add a cc of tutor@python.org On 09/21/2012 08:09 PM, Gina wrote: > On 9/21/2012 6:47 PM, Dave Angel wrote: >> On 09/21/2012 07:34

Re: [Tutor] I don't know why this program doesn't run

2012-09-21 Thread Mark Lawrence
On 22/09/2012 00:44, Stephen Haywood wrote: What doesn't work? What error message do you get? What have you done to fix the errors? What version of Python are you using? Stephen Haywood Information Security Consultant W: www.averagesecurityguy.info T: @averagesecguy On Sep 21, 2012, at 7:35 PM,

Re: [Tutor] I don't know why this program doesn't run

2012-09-21 Thread Mark Lawrence
On 22/09/2012 00:34, Gina wrote: I don't know why this program doesn't run, but if you know, please tell me. -thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I don't know why this program doesn't run

2012-09-21 Thread Dave Angel
On 09/21/2012 07:34 PM, Gina wrote: > I don't know why this program doesn't run, but if you know, please > tell me. > -thanks > So what happens when you try? "Doesn't run" covers a multitude of possibilities. First one: python Car Salesperson.py python: can't open file 'Car': [Errno 2] No such

  1   2   3   4   >