Re: [Tutor] Python code

2019-08-01 Thread David Rock
maybe a copy/paste of your terminal session so we can see the text of the steps you are actually performing will give use some clues. — David > On Aug 1, 2019, at 18:22, David L Neil wrote: > > On 2/08/19 3:23 AM, Spencer Wannemacher wrote: >> I'm new to python and I was trying to perform a

Re: [Tutor] Python code

2019-08-01 Thread David L Neil
On 2/08/19 3:23 AM, Spencer Wannemacher wrote: I'm new to python and I was trying to perform a simple one code. All that is included in the code is print(61). I save it as 61.py and change the directory before typing in python 61.py and I don't get an output. There is no error and the output

Re: [Tutor] Python code

2019-08-01 Thread Cameron Simpson
On 01Aug2019 15:23, Spencer Wannemacher wrote: I'm new to python and I was trying to perform a simple one code. All that is included in the code is print(61). I save it as 61.py and change the directory before typing in python 61.py and I don't get an output. There is no error and the output

[Tutor] Python code

2019-08-01 Thread Spencer Wannemacher
I'm new to python and I was trying to perform a simple one code. All that is included in the code is print(61). I save it as 61.py and change the directory before typing in python 61.py and I don't get an output. There is no error and the output is blank. Please let me know what I'm doing

Re: [Tutor] Python code

2016-11-25 Thread Juan C.
On Thu, Nov 24, 2016 at 9:14 PM, urfa jamil wrote: > > I need help to write a code for this problem. > > Please help > > > Ask the user to enter a series of numbers. Stop reading numbers when they enter a negative number. Calculate the average of the numbers given not

Re: [Tutor] Python code

2016-11-24 Thread Ben Finney
urfa jamil writes: > I need help to write a code for this problem. We can help by discussing the solution you have written. Simply post a reply, and include the program code you wrote for solving the problem. > Please help Note that “help” is not the same as “write the

Re: [Tutor] Python code

2016-11-24 Thread Alan Gauld via Tutor
On 24/11/16 23:14, urfa jamil wrote: > I need help to write a code for this problem. > > Please help OK, But what exactly do you want help with? Have you written any code yet? If so show us. Also if you get an error message post it. > Ask the user to enter a series of numbers. Can you do this

[Tutor] Python code

2016-11-24 Thread urfa jamil
I need help to write a code for this problem. Please help Ask the user to enter a series of numbers. Stop reading numbers when they enter a negative number. Calculate the average of the numbers given not including the final negative number. Question 9 options: With best regards urfa jamil

Re: [Tutor] Python code

2016-11-01 Thread Danny Yoo
On Nov 1, 2016 4:57 PM, "Haley Sandherr" wrote: > > Hello, I am new to python and need help with this question: > > Compose a function odd ( ) that takes three bool arguments and returns True if an odd number of arguments are True and False otherwise. Do you understand

Re: [Tutor] Python code

2016-11-01 Thread Alan Gauld via Tutor
On 01/11/16 21:28, Haley Sandherr wrote: > Hello, I am new to python and need help with this question: What kind of help? What exactly do you find difficult? > > Compose a function odd ( ) Can you define a function? Any function? > that takes three bool arguments Can you define a function

Re: [Tutor] Python code

2016-11-01 Thread Steven D'Aprano
On Tue, Nov 01, 2016 at 05:28:34PM -0400, Haley Sandherr wrote: > Hello, I am new to python and need help with this question: > > Compose a function odd ( ) that takes three bool arguments and returns > True if an odd number of arguments are True and False otherwise. What part are you having

[Tutor] Python code

2016-11-01 Thread Haley Sandherr
Hello, I am new to python and need help with this question: Compose a function odd ( ) that takes three bool arguments and returns True if an odd number of arguments are True and False otherwise. ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] Python Code Not Working

2016-10-11 Thread D . V . N . Sarma డి . వి . ఎన్ . శర్మ
An easier solution is simply to type 'print' in place of 'test' in the program. It will work. regards, Sarma. On Mon, Oct 10, 2016 at 2:09 AM, wrote: > Everytime I run this it says test is not defined . I don’t understand. Can > someone please help correct? > >

Re: [Tutor] Python Code Not Working

2016-10-11 Thread Alan Gauld via Tutor
On 09/10/16 21:39, jeremygaine...@gmail.com wrote: > Everytime I run this it says test is not defined . I don’t understand. It means test is not defined - that is, Python doesn't know about it. You call a function test() but there is no such function built into Python, so it complains.

[Tutor] Python Code Not Working

2016-10-11 Thread jeremygainey14
Everytime I run this it says test is not defined . I don’t understand. Can someone please help correct? #Question 10 def reverse(mystr): reversed = '' for char in mystr: reversed = char + reversed return reversed def is_palindrome(myStr): if myStr in reverse(myStr):

Re: [Tutor] python code error

2014-09-30 Thread Vignesh Sathiamoorthy
You will find the answer here - http://stackoverflow.com/questions/625083/python-init-and-self-what-do-they-do On Sep 29, 2014, at 4:34 PM, Danny Yoo d...@hashcollision.org wrote: On Sun, Sep 28, 2014 at 8:26 AM, Madeleine Austen madeleine.aus...@cvcweb.net wrote: Hi Here is my code:

[Tutor] python code error

2014-09-29 Thread Madeleine Austen
Hi Here is my code: from datetime import datetime timeStart = datetime.now().strftime('%Y-%m-%d %H:%M:%S') numberPlates = 0 print(There has been {0} number plates since {1}.format (numberPlates, timeStart)) speedLimit = 25 distance = 1 class NumberPlates: A class that holds information from

Re: [Tutor] python code error

2014-09-29 Thread Dave Angel
Madeleine Austen madeleine.aus...@cvcweb.net Wrote in message: It says there are no arguements I don't see any print functions with such text, so presumably you're paraphrasing an exception traceback. Please quote the entire traceback, as there is usually lots of information there. And

Re: [Tutor] python code error

2014-09-29 Thread Danny Yoo
On Sun, Sep 28, 2014 at 8:26 AM, Madeleine Austen madeleine.aus...@cvcweb.net wrote: Hi Here is my code: from datetime import datetime timeStart = datetime.now().strftime('%Y-%m-%d %H:%M:%S') numberPlates = 0 print(There has been {0} number plates since {1}.format (numberPlates,

[Tutor] Python Code Error

2014-05-29 Thread Jude Mudannayake
Dear Sir/Madam I am currently having some trouble with a python script that I developed and I would like to know if you could have a look. I basically am attaching the script as part of .py file in this email. The script in its essence is set up to take a set of data from a CSV file

Re: [Tutor] Python Code Error

2014-05-29 Thread Alan Gauld
On 29/05/14 10:48, Jude Mudannayake wrote: its essence is set up to take a set of data from a CSV file (containing x,y points) and then arrange them into coordinates points get an error stating the following: ‘TypeError: point1; found int, expecting tuple’ – This is referring to line 57 of

Re: [Tutor] Python Code Error

2014-05-29 Thread Mark Lawrence
On 29/05/2014 10:48, Jude Mudannayake wrote: [snipped to pieces] for i in range(0,len(Ay11)): k1 = (Ay11[i],Az11[i]) #print k1 myList=k1 xyCoordsInner = tuple(myList) #print xyCoordsInner Further to the reply from Alan Gauld, if you're writing code like this in Python

Re: [Tutor] Python code trouble!

2011-11-22 Thread Asokan Pichai
Okay! I wrote some code. It is below so that you can avoid scrolling down and seeing it if you do not want to see any code! HTH Asokan people = list( ABCDEFGHIJKLMN) COUNT = len(people) remove = 3 SPACE = ' ' def survivorCount(a): return len(a) -

[Tutor] Python code trouble!

2011-11-21 Thread John
Hi all, I have attempted to create a programme which removes every Nth person from the list until there is only one name remaining. N is inputted by the user. Here is the code: def survivor(names, step): next = names while len(next) 1: index = step - 1 next.remove

Re: [Tutor] Python code trouble!

2011-11-21 Thread Dave Angel
You're still posting from tomorrow. On 11/22/2011 05:50 AM, John wrote: Hi all, I have attempted to create a programme which removes every Nth person from the list until there is only one name remaining. N is inputted by the user. Here is the code: def survivor(names, step): next =

Re: [Tutor] Python code trouble!

2011-11-21 Thread Steven D'Aprano
Hello John, You are still posting from the future. Please fix your computer so that it is no longer set 12 hours in the future. Or perhaps your computer is just set in the wrong time zone. John wrote: Hi all, I have attempted to create a programme which removes every Nth person from the

Re: [Tutor] Python code trouble!

2011-11-21 Thread Dave Angel
On 11/21/2011 06:57 PM, Steven D'Aprano wrote: Hello John, You are still posting from the future. Please fix your computer so that it is no longer set 12 hours in the future. Or perhaps your computer is just set in the wrong time zone. John wrote: Hi all, I have attempted to create a

Re: [Tutor] Python code to connect using PPPoE

2007-01-29 Thread Johan Geldenhuys
2007 12:25 AM To: tutor@python.org Subject: Re: [Tutor] Python code to connect using PPPoE Hi Johan, PPPoE is both in the Linux Kernel (for the low level work) and as some executables and scripts. It fou want to establish a connection from a Python script (E.G. ehn the computer has no internet

Re: [Tutor] Python code to connect using PPPoE

2007-01-26 Thread Hugo González Monteverde
Hi Johan, PPPoE is both in the Linux Kernel (for the low level work) and as some executables and scripts. It fou want to establish a connection from a Python script (E.G. ehn the computer has no internet access and you need it) The best way would be to call the appropriate utilities, and

[Tutor] Python code to connect using PPPoE

2007-01-24 Thread Johan Geldenhuys
Hi all, I don't know if this the right place to ask the question, but I did some Googling and struggled to get decent examples of code to use for PPPoE connection. I have a wireless modem that uses PPPoE to connect and want to use Python to connect to the internet through this modem using

Re: [Tutor] Python code to connect using PPPoE

2007-01-24 Thread Kent Johnson
Johan Geldenhuys wrote: Hi all, I don't know if this the right place to ask the question, but I did some Googling and struggled to get decent examples of code to use for PPPoE connection. I have a wireless modem that uses PPPoE to connect and want to use Python to connect to the

Re: [Tutor] Python code to connect using PPPoE

2007-01-24 Thread Johan Geldenhuys
PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] Python code to connect using PPPoE Johan Geldenhuys wrote: Hi all, I don't know if this the right place to ask the question, but I did some Googling and struggled to get decent examples of code to use for PPPoE connection. I have a wireless

Re: [Tutor] Python code to connect using PPPoE

2007-01-24 Thread Kent Johnson
Johan Geldenhuys wrote: Kent, I want to establish the connection with Python. I think in Linux you can use a PPPoE package to make life easier, but I don't want to use the Kernel to do that. If you are on Linux, maybe you can use os.command() to control rp-pppoe.

Re: [Tutor] Python code to connect using PPPoE

2007-01-24 Thread Johan Geldenhuys
Is there a module that I can use for this or is it a os function? Johan -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: 24 January 2007 04:39 PM To: [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] Python code to connect using PPPoE Johan Geldenhuys

Re: [Tutor] Python code to connect using PPPoE

2007-01-24 Thread Kent Johnson
@python.org Subject: Re: [Tutor] Python code to connect using PPPoE Johan Geldenhuys wrote: Kent, I want to establish the connection with Python. I think in Linux you can use a PPPoE package to make life easier, but I don't want to use the Kernel to do that. If you are on Linux, maybe you can use

Re: [Tutor] Python code to split and reassemble files

2006-10-02 Thread Eric Walstad
Andrew Robert wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Never mind.. :) found it at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/224800 However, if someone has something better, I would be very interested. Hi Andrew, If you are on a *nix machine you could use

[Tutor] Python code to split and reassemble files

2006-10-01 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi guys, Awhile back, I believe I saw a cookbook recipe for splitting and reassembling text/binary files. Does anyone know where this or something similar can be found? I am working on a file transfer mechanism via MQSeries and breaking large files

Re: [Tutor] Python code to split and reassemble files

2006-10-01 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Never mind.. :) found it at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/224800 However, if someone has something better, I would be very interested. Andrew Robert wrote: Hi guys, Awhile back, I believe I saw a cookbook recipe for

Re: [Tutor] Python code to split and reassemble files

2006-10-01 Thread Kent Johnson
Andrew Robert wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi guys, Awhile back, I believe I saw a cookbook recipe for splitting and reassembling text/binary files. Does anyone know where this or something similar can be found? Searching the cookbook for 'split file' finds

[Tutor] Python Code

2006-03-29 Thread Kaushal Shriyan
Hi I am unable to execute the below code, I have put this in test.py file and made it executable, when I run this I see no output, Please explain me as what is exactly going on with the below code The below code is from http://www.ibiblio.org/obp/thinkCSpy/chap11.htm def copyFile(oldFile,

[Tutor] Python code pretty-print?

2006-01-03 Thread Lance E Sloan
A colleague of mine often develops Python code under Mac OS X. He would like to be able to print the code in an easily readable format. He's found that kwrite on Linux does a very nice job, but it's inconvenient to copy his code to a Linux box just to print it out. We've found mention

Re: [Tutor] Python code pretty-print?

2006-01-03 Thread Danny Yoo
On Tue, 3 Jan 2006, Lance E Sloan wrote: A colleague of mine often develops Python code under Mac OS X. He would like to be able to print the code in an easily readable format. He's found that kwrite on Linux does a very nice job, but it's inconvenient to copy his code to a Linux box just

Re: [Tutor] Python code pretty-print?

2006-01-03 Thread Alan Gauld
the same trick but I don't know how well it runs on MacOS. http://mailman.lyra.org/pipermail/scintilla-interest/2003-May/002756.html Alan G. - Original Message - From: Lance E Sloan [EMAIL PROTECTED] To: tutor@python.org Sent: Tuesday, January 03, 2006 2:12 PM Subject: [Tutor] Python code