Re: [Tutor] [Python-Help] Writing hello world

2019-06-29 Thread Bob Gailer
On Jun 28, 2019 9:26 AM, "Erastus muriithi" wrote: > > Iam a student..iam interested in learning python,,I don't know how to study this python.kindly help me how to go about it..Thankyou First make sure you have python installed on your computer. If you need help with that let us know what kind

Re: [Tutor] Python Help

2018-10-26 Thread Alan Gauld via Tutor
On 26/10/2018 18:20, Adam Eyring wrote: > beef = (beefmeals * 15.95) Note that the parens here are completely redundant. They don't break anything but neither do they contribute anything. WE already have LISP(*) for those who love parens, no need for (so many of) them in Python (*)Lots of

Re: [Tutor] Python Help

2018-10-26 Thread Adam Eyring
On Fri, Oct 26, 2018 at 3:03 PM Bob Gailer wrote: > On Oct 26, 2018 1:20 PM, "Adam Eyring" wrote: > > > > Try this cleaned up version with colons in the right places, dollar > signs removed, and other corrections: > > Does it do what you want? > > > beefmeals=int(input("Enter number of beef

Re: [Tutor] Python Help

2018-10-26 Thread Adam Eyring
Try this cleaned up version with colons in the right places, dollar signs removed, and other corrections: beefmeals=int(input("Enter number of beef meals: ")) shitmeals=int(input("Enter number of vegan meals: ")) party = beefmeals + shitmeals print("Total meals", party) a = 0 b = 0 c = 0 if party

Re: [Tutor] Python Help

2018-10-26 Thread Bob Gailer
On Oct 26, 2018 1:20 PM, "Adam Eyring" wrote: > > Try this cleaned up version with colons in the right places, dollar signs removed, and other corrections: Does it do what you want? > beefmeals=int(input("Enter number of beef meals: ")) > shitmeals=int(input("Enter number of vegan meals: ")) >

Re: [Tutor] Python Help

2018-10-26 Thread Bob Gailer
On Oct 26, 2018 6:11 AM, "Ben Placella" wrote: > > I need to write code that runs a cost calculating program with many > different variables and I honestly don't understand it Could you be more specific? What exactly don't you understand, or even better what do you understand? my code is: How

Re: [Tutor] Python Help

2018-10-26 Thread Alan Gauld via Tutor
On 25/10/2018 23:14, Ben Placella wrote: Please always post code in plain text not HTML or Rich text. Otherwise we lose all the formatting which is important in Python. > beefmeals=int(input("Enter number of beef meals: ")) > shitmeals=int(input("Enter number of vegan meals: ")) >

Re: [Tutor] Python Help (shits killing me)

2018-10-26 Thread Steven D'Aprano
On Thu, Oct 25, 2018 at 06:13:31PM -0400, Ben Placella wrote: > So I have to make a fibonacci sequence, and I'm not sure what is wrong with > my code [...] > attached is a photo of what the output SHOULD look like No it isn't. For security (anti-spam, anti-virus) reasons, this mailing list

Re: [Tutor] Python Help

2018-10-26 Thread Steven D'Aprano
On Thu, Oct 25, 2018 at 06:14:41PM -0400, Ben Placella wrote: > I need to write code that runs a cost calculating program with many > different variables and I honestly don't understand it, my code is: > beefmeals=int(input("Enter number of beef meals: ")) > shitmeals=int(input("Enter number of

Re: [Tutor] Python Help (shits killing me)

2018-10-26 Thread Alan Gauld via Tutor
Plain text is preferred for code since otherwise the mail system removes all indentation making the code hard to understand. On 25/10/2018 23:13, Ben Placella wrote: > So I have to make a fibonacci sequence, and I'm not sure what is wrong with > my code > #This program illustrates the fibonacci

Re: [Tutor] Python Help (shits killing me)

2018-10-26 Thread Andrew Van Valkenburg
nth = n1 + n I don't see where n is defined anywhere. Should be n2? On Fri, Oct 26, 2018 at 6:09 AM Ben Placella wrote: > So I have to make a fibonacci sequence, and I'm not sure what is wrong with > my code > #This program illustrates the fibonacci sequence > nterms=int(input("Please enter

Re: [Tutor] Python help

2018-04-02 Thread Alan Gauld via Tutor
On 03/04/18 01:19, Steven D'Aprano wrote: > >> if Grade not in 'A','B','C','D','E','F': > Actually, that returns a tuple consisting of a flag plus five more > strings: > > py> 'A' in 'A','B','C', 'D', 'E', 'F' > (True, 'B','C', 'D', 'E', 'F') Although in the context of the program the colon

Re: [Tutor] Python help

2018-04-02 Thread Alan Gauld via Tutor
On 03/04/18 01:19, Steven D'Aprano wrote: > On Tue, Apr 03, 2018 at 01:00:59AM +0100, Alan Gauld via Tutor wrote: > >> You need to use 'in' instead. That will check whether >> or not Grade is *one* of the values in the tuple. >> >> if Grade not in 'A','B','C','D','E','F': > Actually, that

Re: [Tutor] Python help

2018-04-02 Thread Steven D'Aprano
On Tue, Apr 03, 2018 at 01:00:59AM +0100, Alan Gauld via Tutor wrote: > You need to use 'in' instead. That will check whether > or not Grade is *one* of the values in the tuple. > > if Grade not in 'A','B','C','D','E','F': Actually, that returns a tuple consisting of a flag plus five more

Re: [Tutor] Python help

2018-04-02 Thread Alan Gauld via Tutor
On 02/04/18 23:44, Shannon Evans via Tutor wrote: > Hi, I am trying to write a code with if statements but the code keeps just > repeating and not carrying on. There are quite a few problems here, see comments below. > while True: > try: > Grade = int(raw_input("Please enter your

Re: [Tutor] Python help

2018-04-02 Thread Steven D'Aprano
On Mon, Apr 02, 2018 at 11:44:39PM +0100, Shannon Evans via Tutor wrote: > Hi, I am trying to write a code with if statements but the code keeps just > repeating and not carrying on. > I am trying to get user to input a grade, either A, B, C, D, E or F and > trying to have an error message if

Re: [Tutor] PYTHON HELP

2018-03-15 Thread Alan Gauld via Tutor
On 15/03/18 13:42, Prashanth Ram wrote: > My code is working well in localhost but when I try to open that in VPS > server I'm failing in running that code. I'm getting errors. I have > installed Chrome and it's drivers. Even though I'm facing errors. > > I request your team to help me in this.

Re: [Tutor] PYTHON HELP

2018-03-15 Thread David Rock
> On Mar 15, 2018, at 08:42, Prashanth Ram wrote: > > I'm a beginner in Python. I have written a code to open browsers using > selenium framework. I have purchased a Virtual Private Server (VPS) with > CentOS 6.9 installed from GoDaddy. > > My code is working well in

Re: [Tutor] Python Help

2017-09-16 Thread Mats Wichmann
On 09/15/2017 10:25 AM, Alan Gauld via Tutor wrote: > On 15/09/17 04:08, Pratyusha Thundena wrote: >> How do check to see if string ‘garden’ contains a >> vowel(a, e , i , o, u , or y) using a for loop? > > Hi, this sounds like homework and we won't do > your homework for you, but we do give

Re: [Tutor] Python Help

2017-09-15 Thread Alan Gauld via Tutor
On 15/09/17 04:08, Pratyusha Thundena wrote: > How do check to see if string ‘garden’ contains a > vowel(a, e , i , o, u , or y) using a for loop? Hi, this sounds like homework and we won't do your homework for you, but we do give hints. How would you do this without a computer? There are (at

Re: [Tutor] Python help

2017-07-23 Thread Cameron Simpson
On 23Jul2017 13:40, Winonah Ojanen wrote: I also tried the correct command for the mac ox s in terminal shell, running: Jims-MacBook-Pro-2:~ Jim$ PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH export PYTHONPATH [...] I did use the pip command and am

Re: [Tutor] Python Help

2017-07-22 Thread Cameron Simpson
On 23Jul2017 00:20, Alan Gauld wrote: On 22/07/17 19:14, Winonah Ojanen wrote: using python with anaconda in jupiter notebook. However, I am having Usual caveat: The tutor list is targeted at the standard library so any help for non standard library modules is best

Re: [Tutor] Python Help

2017-07-22 Thread Alan Gauld via Tutor
On 22/07/17 19:14, Winonah Ojanen wrote: > using python with anaconda in jupiter notebook. However, I am having Usual caveat: The tutor list is targeted at the standard library so any help for non standard library modules is best sought from the library support fora. In this case that includes

Re: [Tutor] Python - help with something most essential

2017-06-12 Thread Abdur-Rahmaan Janhangeer
i might add that with open( . . . instead of foo = open( . . . also shows some maturity in py Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 11 Jun 2017 12:33, "Peter Otten" <__pete...@web.de> wrote: > Japhy Bartlett wrote: > > > I'm not sure that they cared

Re: [Tutor] Python - help with something most essential

2017-06-11 Thread Peter Otten
Japhy Bartlett wrote: > I'm not sure that they cared about how you used file.readlines(), I think > the memory comment was a hint about instantiating Counter()s Then they would have been clueless ;) Both Schtvveer's original script and his subsequent "Verschlimmbesserung" -- beautiful german

Re: [Tutor] Python - help with something most essential

2017-06-10 Thread Japhy Bartlett
It's really awkward the way you're using Counter here... you're making new instances in every lambda (which is not great for memory usage), and then not actually using the Counter functionality: return sum(1 for _ in filter(lambda x: Counter(word) == Counter(x.strip()), fileContent)) (the

Re: [Tutor] Python - help with something most essential

2017-06-06 Thread Peter Otten
Schtvveer Schvrveve wrote: > I need someone's help. I am not proficient in Python and I wish to > understand something. I was in a job pre-screening process where I was > asked to solve a simple problem. > > The problem was supposed to be solved in Python and it was supposed to > take two

Re: [Tutor] Python - help with something most essential

2017-06-05 Thread David Rock
> On Jun 5, 2017, at 09:36, Schtvveer Schvrveve wrote: > > > And I was rejected. I just wish to understand what I could have done for > this to be better? > > I am a Python beginner, so I'm sure there are things I don't know, but I > was a bit surprised at the abruptness of

Re: [Tutor] python help

2017-04-13 Thread George Fischhof
Hi Christina, you should use an editor or an IDE (Integrated Development Environment) (a quite good and my favorite IDE is PyCharm https://www.jetbrains.com/pycharm/download/#section=windows ), write the script in it,then save, then run it from the IDE or from command line with similar command:

Re: [Tutor] python help

2017-04-13 Thread Qiao Qiao
If you are going to send it to your professor. Maybe just copy all your result to a txt file and send the text? Qiao Qiao Qiao Web Engineer On Thu, Apr 13, 2017 at 10:33 AM, Christina Hammer < hamme...@mail.montclair.edu> wrote: > Hi, > I downloaded the newest version of Python on my windows

Re: [Tutor] python help

2017-04-13 Thread Alan Gauld via Tutor
On 13/04/17 15:33, Christina Hammer wrote: > I downloaded the newest version of Python on my windows computer and am > having some trouble using it. I need to save my work because I am using it > for an online class and am going to have to send it to my professor. But I > cannot access a tool bar

Re: [Tutor] Python Help

2016-11-16 Thread Alan Gauld via Tutor
On 16/11/16 22:51, Omari Lamar wrote: > I am looking for assistance with the python language. Can you send out an > eblast asking that if anyone can offer 1 on 1 assistance via skype to cover > the basics that would be greatly appreciated. Further to Bens message, we don't offer private 1-1

Re: [Tutor] Python Help

2016-11-16 Thread Ben Finney
Omari Lamar writes: > I am looking for assistance with the python language. Yes, we offer that here. You need to ask your question in this forum and volunteers will collaborate to teach you, in public. This way many other people can also benefit from observing the

Re: [Tutor] Python help

2016-10-17 Thread Andrew Koe
Hi, Also, you have a typo in your elif path == '2' statement. It should be rock = input('Do you want to pick up the rock') with one equal sign not rock == input ('Do you want to pick up the rock'). -Andrew On Sat, Oct 15, 2016 at 6:48 PM, Nicholas Hopkins

Re: [Tutor] Python help

2016-10-16 Thread Alex Kleider
On 2016-10-15 15:48, Nicholas Hopkins wrote: Hello Please tell me what is wrong with my code and how I can put an if else statement inside of another if else statement This is my code: path = input('Which path number will you take?') if path == '1': print('You took the first path')

Re: [Tutor] Python help

2016-10-16 Thread Alan Gauld via Tutor
On 15/10/16 23:48, Nicholas Hopkins wrote: > Please tell me what is wrong with my code and how I can put an if else > statement > inside of another if else statement You are almost right but... > This is my code: > path = input('Which path number will you take?') > if path == '1': >

Re: [Tutor] Python help

2015-08-24 Thread William
This is in response to a much earlier posting for which I don't have the email [Tutor] Python help IDN3 iradn3777 at gmail.com Thu Aug 13 03:01:12 CEST 2015 Previous message (by thread): [Tutor] revisiting a puzzle about -3**2 vs (-3)**2 Next message (by thread): [Tutor] Python help Messages

Re: [Tutor] Python help

2015-08-13 Thread Cameron Simpson
On 13Aug2015 10:34, ALAN GAULD alan.ga...@btinternet.com wrote: On 13/08/15 02:01, IDN3 wrote: [...snip...] Condition: If c is less than 5, then the loop will continue; else, it will end. 3. *Problem 2:*Print a string variable that states the number of loops required to meet the condition

Re: [Tutor] Python help

2015-08-13 Thread Alan Gauld
On 13/08/15 10:44, Cameron Simpson wrote: You obviously did not send the whole question. I don't see any mention of if/then/else? Actually, the question's Condition: section is written in exactly those terms. Oops, so it is. My bad. -- Alan G Author of the Learn to Program web site

Re: [Tutor] Python help

2015-08-13 Thread Alan Gauld
On 13/08/15 02:01, IDN3 wrote: To whom it may concern, I am having a problem solving the below question. I have used every resource that I could find to help me, but I'm seeing nothing. Can someone out there please help me understand the below question and learn how to accomplish this

Re: [Tutor] python help

2015-07-06 Thread Mark Lawrence
On 06/07/2015 15:24, Cary Developer wrote: Welcome. I am looking for help on getting started with Python. You've come to the right place, that's always a good start. This link says it all: http://raleigh.craigslist.org/cpg/5108772711.html Any help (and response to the CL post) would be

Re: [Tutor] python help

2015-07-06 Thread Alan Gauld
On 06/07/15 15:24, Cary Developer wrote: I am looking for help on getting started with Python. This link says it all: http://raleigh.craigslist.org/cpg/5108772711.html It would be more helpful to post the content of the query, not all mail subscribers can access web pages at the time of

Re: [Tutor] python help

2015-07-06 Thread Matt Williams
Personally I would start with Python 2.7, and start with simple scripts. The standard library in Python is very wide, and having a good understanding of what is already there is very useful. As to GUI/ Web/ etc. - I think it depends on what you want to do. However, you will need the basics

Re: [Tutor] python help

2015-07-06 Thread Mark Lawrence
On 06/07/2015 22:09, Matt Williams wrote: Personally I would start with Python 2.7, and start with simple scripts. I think it makes much more sense to learn Python 3 and if you need code to run on both 2 and 3 take the advice here https://docs.python.org/3/howto/pyporting.html By the way,

Re: [Tutor] Python Help

2015-06-24 Thread Alan Gauld
On 24/06/15 20:25, Nirav Patel via Tutor wrote: ... research using a program called VisIt. One simple thing I am trying to do is using python to call a command that processes all the files that exist within the directory by having visit access the files. I have started to code below, but

Re: [Tutor] Python Help

2015-05-04 Thread Peter Otten
Grace Anne St Clair-Bates wrote: I am trying to write a program that uses while and if loops, but my print statements are not going through and showing up when I run the module. I have tried numerous things and changed in the code and cannot for the life of me figure out why it won't print.

Re: [Tutor] Python Help

2015-05-04 Thread Alan Gauld
On 04/05/15 06:00, Grace Anne St Clair-Bates wrote: I am trying to write a program that uses while and if loops, but my print statements are not going through and showing up when I run the module. I have tried numerous things and changed in the code and cannot for the life of me figure out why

Re: [Tutor] Python Help

2015-04-14 Thread Alan Gauld
On 14/04/15 02:39, Janelle Harb wrote: Hello! I have a Mac and idle refuses to quit no matter what I try to do. What should I do? You can start by giving us some specific examples of things you did that didn't work. Starting with the obvious: 1) Did you click the little close icon? 2)

Re: [Tutor] Python Help with Program

2015-02-16 Thread Steven D'Aprano
Hi Tina, or Taylor, welcome! Sorry but your email From header says your name is Tina and your signature says Taylor so I'm not sure which name you prefer. On Sun, Feb 15, 2015 at 07:26:35PM -0600, Tina Figz wrote: I'm having a problem with my program and I'm not sure how to correct it (I'm

Re: [Tutor] Python Help with Program

2015-02-16 Thread Mark Lawrence
On 16/02/2015 08:24, Alan Gauld wrote: On 16/02/15 01:26, Tina Figz wrote: I'm having a problem with my program and I'm not sure how to correct it (I'm in an intro programming class). My program is supposed two numbers and count the number of carry operations. This is what I have: n1 =

Re: [Tutor] Python Help with Program

2015-02-16 Thread Alan Gauld
On 16/02/15 01:26, Tina Figz wrote: I'm having a problem with my program and I'm not sure how to correct it (I'm in an intro programming class). My program is supposed two numbers and count the number of carry operations. This is what I have: n1 = int(raw_input('Number #1: ')) n2 =

Re: [Tutor] Python help

2014-11-03 Thread Alan Gauld
On 03/11/14 20:26, Juwel Williams wrote: I am confused about tuples, lists and dictionaries. The more specific your question the easier it is for us to answer. What exactly is confusing you about them? What they are? How to use them? The syntax? Now he has moved on to class and modules. Can

Re: [Tutor] Python Help

2014-10-20 Thread Alan Gauld
On 20/10/14 03:56, Taylor Ruzgys wrote: Hi, I was wondering if you could help me with an assignment that I'm doing involving Python? Yes, we can help you do it. We won't do it for you. You need to tell us what the assignment is, how you have tried to solve it, including any code you've

Re: [Tutor] Python Help

2014-04-09 Thread Alan Gauld
On 09/04/14 20:59, Adam Grierson wrote: I'm using 3D climate data (ending in “.nc”). The cube contains time, longitude and latitude. I would like to look at the average output over the last 20 years. The time field spans back hundreds of years and I only know how to collapse the entire field

Re: [Tutor] Python Help

2014-04-09 Thread Chris Calloway
On 4/9/2014 3:59 PM, Adam Grierson wrote: I'm using 3D climate data (ending in “.nc”). The cube contains time, longitude and latitude. I would like to look at the average output over the last 20 years. The time field spans back hundreds of years and I only know how to collapse the entire field

Re: [Tutor] Python help

2014-02-28 Thread Ben Finney
Tone Lite tonelitebe...@gmail.com writes: I am having trouble coming up with a solution to this exercise and any help would be appreciated, thanks! I have attached the code below. The code you present appears to be the exercise. Are you asking for someone to write the solution for you? That

Re: [Tutor] Python help

2014-02-28 Thread James Chapman
The answer lies in this page: http://docs.python.org/3.3/library/stdtypes.html#string-methods -- James On 28 February 2014 11:44, James Chapman ja...@uplinkzero.com wrote: The answer lies in this page: http://docs.python.org/3.3/library/stdtypes.html#string-methods -- James On 28

Re: [Tutor] [Python-Help] Please help replace Long place-names with short place-names in many files with Python

2013-09-01 Thread bob gailer
Welcome. We are a few volunteers who like to help you when you have tried something and are stuck. It is best to post to just one email list. Most of us monitor tutor and help. We don't write programs for you. Some of us would be happy to do that for a consulting fee. Why Python? What

Re: [Tutor] [Python-Help] Instancing class issue

2013-08-15 Thread Dino Bektešević
Hello, The name of the variable doesn't matter, that's still what it does; you can think of it as encapsulating any other keyword arguments. def foo(bar, **kwargs): ... print(bar: %s % (bar,)) ... print(kwargs: %r % (kwargs,)) ... foo(bar, baz=qux,

Re: [Tutor] [Python-Help] Instancing class issue

2013-08-12 Thread Chris Down
Hi Dino, On 2013-08-12 20:32, Dino Bektešević wrote: def __init__(self, **keys): from . import util self.keys=keys self.load() where I don't understand what **keys mean, I've only seen that as **kwargs meaning other key words and arguments in examples. The

Re: [Tutor] Python help!!

2013-04-02 Thread taserian
On Tue, Apr 2, 2013 at 12:49 PM, David Mitchell d_mitchel...@hotmail.comwrote: Hi! How do I go through a text file, finding specific words/numbers/phrases and edit them to say different things? I do not want to edit the text file, I would rather open and read from the text file and write to

Re: [Tutor] Python help!!

2013-04-02 Thread Bod Soutar
On 2 April 2013 17:49, David Mitchell d_mitchel...@hotmail.com wrote: Hi! How do I go through a text file, finding specific words/numbers/phrases and edit them to say different things? I do not want to edit the text file, I would rather open and read from the text file and write to a new

Re: [Tutor] Python help!!

2013-04-02 Thread Elegbede Muhammed Oladipupo
What exactly do you know how to do? Can you read files? Can you replace words? This way, I can know how to help. What is hard for me to help with is the fact that you are planning to replace the same word with two different words depending on location e.g when you said you want to change off

Re: [Tutor] python help!

2013-02-09 Thread Peter Otten
Ghadir Ghasemi wrote: Hi guys can you tell me what is wrong with the second part of this code(elif choice == '2'). When I type something other than 0-255, it correctly asks again for an input but when I enter a number from 0-255 it does nothing : It doesn't do nothing, it keeps running the

Re: [Tutor] python help!

2013-02-09 Thread D . V . N . Sarma డి . వి . ఎన్ . శర్మ
I have altered the program to run on Python 2.7.3 Perhaps it will run on Python 3 with small/or no alterations. def show_menu(): print(===) print(1-binary to denary) print(2-denary to binary) print(3-exit) print(===) while True: show_menu()

Re: [Tutor] python help!

2013-02-09 Thread D . V . N . Sarma డి . వి . ఎన్ . శర్మ
Remove also 'continue' statement under the 'if denary2 not in range(0,256)' clause. On Sun, Feb 10, 2013 at 7:06 AM, D.V.N.Sarma డి.వి.ఎన్.శర్మ dvnsa...@gmail.com wrote: I have altered the program to run on Python 2.7.3 Perhaps it will run on Python 3 with small/or no alterations. def

Re: [Tutor] Python Help

2013-01-26 Thread wrw
On Jan 23, 2013, at 4:37 PM, Grady Trexler grady...@gmail.com wrote: Below is my code. I am using python 2.4 It tells me I have a syntax error. Please help! (I think the first twenty lines have what you would be looking for. After that it just repeats itself.) #scenario maker

Re: [Tutor] Python Help

2013-01-26 Thread Dave Angel
On 01/23/2013 04:37 PM, Grady Trexler wrote: Below is my code. I am using python 2.4 It tells me I have a syntax error. I don't see any such thing. Plesae include the traceback, which will indicate WHERE you have a syntax error. And if you look yourself, you'll probably spot it, since

Re: [Tutor] python help?

2012-10-01 Thread c smith
It is hard to see things like images and attachments. I think purely html is preferred, but i would have to look over 'the list rules' again. You should look into dictionaries as the structure to hold your info. ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] python help?

2012-10-01 Thread Dave Angel
On 10/01/2012 08:16 PM, c smith wrote: It is hard to see things like images and attachments. I think purely html is preferred, but i would have to look over 'the list rules' again. Since this is a text mailing-list, it's text messages that are preferred. html messages frequently trash

Re: [Tutor] python help?

2012-10-01 Thread Dave Angel
On 09/30/2012 02:02 AM, patrick Howard wrote: I have to write a program that takes an input file, with students names and various grades. My vindictive teacher also added grades that are not supposed to count, so I need to pick the grades that are 'HM1-4; not HW, or TEST or anything else.

Re: [Tutor] python help?

2012-10-01 Thread Dave Angel
On 10/01/2012 09:44 PM, Dave Angel wrote: On 09/30/2012 02:02 AM, patrick Howard wrote: I have to write a program that takes an input file, with students names and various grades. My vindictive teacher also added grades that are not supposed to count, so I need to pick the grades that are

Re: [Tutor] Python help

2012-09-15 Thread Joel Goldstick
On Sat, Sep 15, 2012 at 11:21 AM, Daniel Hulse dhuls...@gmail.com wrote: Hi. I am trying to solve a problem and I'm stuck. The problem is something like as x goes up by 1, y goes up by the previous value times 2. I have no idea where to start. So lets say x = 10 and y=5, when x=11, why would

Re: [Tutor] [Python-Help] What is lambdas in Python??

2011-12-27 Thread bob gailer
On 12/27/2011 8:36 PM, Hitesh Kumar wrote: I really don't get it. What is lambda? I keep seeing it and I couldn't understand anything online about it. lambda An anonymous inline function consisting of a single /expression/ #term-expression which is evaluated when the function is called.

Re: [Tutor] [Python-Help] What is lambdas in Python??

2011-12-27 Thread R. Alan Monroe
I really don't get it. What is lambda? I keep seeing it and I couldn't understand anything online about it. It took me a while to get it too. It's for those rare times when you want a throwaway function. Like you want to do something kind of functioney without going to the trouble of

Re: [Tutor] Python Help

2010-09-28 Thread masawudu bature
don't know how to write a code to count the number of divisors From: David Hutto smokefl...@gmail.com To: masawudu bature mass0...@yahoo.ca Cc: tutor@python.org Sent: Mon, September 27, 2010 11:36:05 PM Subject: Re: [Tutor] Python Help On Tue, Sep 28, 2010 at 12:15

Re: [Tutor] Python Help

2010-09-28 Thread Alan Gauld
masawudu bature mass0...@yahoo.ca wrote The output is suppose to count the number of even divisors the range has. You need to work this through again in your head: def evenCount(b) : This function takes a parameter b but you never use b in the function... for n in range(x, y+1) :

Re: [Tutor] Python Help

2010-09-28 Thread Steven D'Aprano
On Tue, 28 Sep 2010 02:15:52 pm masawudu bature wrote: I'm having a hard time finding the count of divisors that are even. Help anybody? Here's my code. The output is suppose to count the number of even divisors the range has. I don't understand the question. What do you mean by divisors

Re: [Tutor] Python Help

2010-09-27 Thread David Hutto
On Tue, Sep 28, 2010 at 12:15 AM, masawudu bature mass0...@yahoo.ca wrote: I'm having a hard time finding the count of divisors that are even. Help anybody? Here's my code. The output is suppose to count the number of even divisors the range has. def evenCount(b) :     for n in range(x,

Re: [Tutor] Python Help - How to end program

2010-07-29 Thread Alan Gauld
Jason MacFiggen jmacfig...@gmail.com wrote Python keeps looping when it gets past the int 0, how do I end the program when it the int 0 or 0. while True: if mo_hp 0: print The Lich King has been slain! elif my_hp 0: /etc... When using a while True loop you

Re: [Tutor] Python Help - How to end program

2010-07-28 Thread Benjamin Castillo
Jason   Are you trying to prevent negative numbers?   Ben --- On Wed, 7/28/10, Jason MacFiggen jmacfig...@gmail.com wrote: From: Jason MacFiggen jmacfig...@gmail.com Subject: [Tutor] Python Help - How to end program To: tutor@python.org Date: Wednesday, July 28, 2010, 9:01 PM Python keeps

Re: [Tutor] Python Help - How to end program

2010-07-28 Thread Mark Tolonen
Jason MacFiggen jmacfig...@gmail.com wrote in message news:aanlktinevw8zje7fxktomks+tbrp=trmb7sb7pbkt...@mail.gmail.com... Python keeps looping when it gets past the int 0, how do I end the program when it the int 0 or 0. my_hp = 50 mo_hp = 50 my_dmg = random.randrange(1, 20) mo_dmg

Re: [Tutor] Python help please

2010-03-23 Thread spir ☣
On Mon, 22 Mar 2010 22:31:58 + laura castañeda laura_cast...@hotmail.com wrote: Hi my name is Laura and im currently trying to solve one of the challenges in the book: Python Programming, second edition by Michael Dawson... I'm stuck in the 5 chapter because of this challenge, im the

Re: [Tutor] Python help please

2010-03-22 Thread Alan Gauld
laura castañeda laura_cast...@hotmail.com wrote Hi my name is Laura and im currently trying to solve one of the challenges in the book: Python Programming, ... if u can help me with it. Right now im trying to teach my self programming and i found the book really useful Hi feel free to sitgn

Re: [Tutor] python help needed

2009-10-12 Thread Kent Johnson
On Mon, Oct 12, 2009 at 2:15 AM, mazher ahmad mazher_an...@hotmail.com wrote: i wana make ToC/headings for any PDF documents ,PDFminer solves the my problem if ToC  are given.i came across many files where there is no Toc. Does any one know ,how to extract ToC/headings from such files. I

Re: [Tutor] Python help

2009-04-25 Thread Alan Gauld
IT_ForMe snice14...@aol.com wrote cart = {apple:2.00, orange:2.50, banana:1.75} You set this up but then don't use it. Also your problem statement said *some* items were taxable, implying some were not. You might want to record whether an item is taxable in the dictionary too. print cart

Re: [Tutor] Python help

2009-04-22 Thread Robert Berman
Yes. Show us your solution and perhaps we can help you make it a tad more efficient. Robert Berman IT_ForMe wrote: Anyone know how to program this using Python Add up the prices for items in a shopping cart. Some items are taxable and some items are not. You may assume a 7% tax rate for

Re: [Tutor] Python help

2009-04-22 Thread W W
On Wed, Apr 22, 2009 at 11:08 AM, IT_ForMe snice14...@aol.com wrote: Anyone know how to program this using Python Add up the prices for items in a shopping cart. Some items are taxable and some items are not. You may assume a 7% tax rate for all taxable items. Apply a 10% discount if the

Re: [Tutor] Python HELP

2008-10-24 Thread Kent Johnson
On Fri, Oct 24, 2008 at 1:18 PM, A .K Hachem [EMAIL PROTECTED] wrote: hey there, if anyone can help me with an assignment im stuck in for a fee i will be grateful We will help for free if you show us what you have done and ask specific questions. We won't do your homework for you. Kent

Re: [Tutor] [Python-Help] [EMAIL PROTECTED]

2008-02-11 Thread bob gailer
Artur Sousa wrote: What's the difference between: code for a in range(2, 10): for n in range(2, a): if a % n == 0: print a, 'equals', n, '*', a/n break else: print a, 'is a prime number' /code and code for a in range(2, 10):

Re: [Tutor] Python help

2006-03-28 Thread Danny Yoo
On Tue, 28 Mar 2006, Natasha Menon wrote: i need help on a terrible homework assignment. do ul offer hw help? Not directly. Your homework is really your own to do. Please try to avoid the temptation of just posting a homework question here and hoping that someone will do the work for you.

Re: [Tutor] Python help

2006-03-28 Thread Hugo González Monteverde
Why not post where you are stuck or what you are trying to understand? and we'll give you help and direction. What we cannot do is solve your homework for you. Hugo Natasha Menon wrote: hi, i need help on a terrible homework assignment. do ul offer hw help?

Re: [Tutor] python help

2006-02-09 Thread Alan Gauld
Ben, Write a function that that uses X and Y techniques. I realise teachers have to test mastery of certain techniques, but they seem to lack the imagination. To be fair to teachers, its often the students who lack imagination. If you pose the problem as write an application to count the

Re: [Tutor] python help

2006-02-09 Thread Alan Gauld
has no human context whatsoever, so of course it's a useless homework problem. Why would someone want to take a useless histogram of a bunch of letters? Erm me! Communications analysts and cryptographers do that all the time! :-) The problem is fine, it's the context that would give it a

Re: [Tutor] python help

2006-02-08 Thread Matthew Webber
These sound like homework questions, in which case it would not be right for us to just give you the answer (and it would not be right for you to ask for it). If you can show us what you have tried so far, maybe we can give you some hints ... From:

Re: [Tutor] python help

2006-02-08 Thread Danny Yoo
These sound like homework questions, in which case it would not be right for us to just give you the answer (and it would not be right for you to ask for it). Agreed; these are not small questions at all. Natasha, if you're having trouble, please be more specific about what you're getting

Re: [Tutor] python help

2006-02-08 Thread Alan Gauld
I have a few doubts in python programming. C if any of u can help me out. Have no doubts - Python can do all of this. In a file called string_stuff.py i have to write a function called frequencies that takes a string as a parameter and returns a dictionary where the keys are the

Re: [Tutor] python help

2006-02-08 Thread Ben Vinger
Why are these homework programming challenges so recognisable? It boils down to: Write a function that that uses X and Y techniques. The function may be hard and challenging to write but doesn't ever do anything interesting or anything that is useful and complete on its own. I realise teachers

Re: [Tutor] python help

2006-02-08 Thread Danny Yoo
I realise teachers have to test mastery of certain techniques, but they seem to lack the imagination. I agree; the problem here, I think, is that these homework questions often focus WAY too much on Python-specific features, rather than on fundamental issues, and so the questions end up

Re: [Tutor] [Python-Help] Variable question

2005-07-15 Thread Danny Yoo
[Note: try to avoid crossposting. The Mailing List Ettiquette FAQ: http://www.gweep.ca/~edmonds/usenet/ml-etiquette.html explains why crossposting isn't such a good idea usually. I'm taking [EMAIL PROTECTED] out of CC now.] I am trying to pass a variable into this ESRI function and it

  1   2   >