"masawudu bature" 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) :
What are x and
ry, I just don't know how to write a code to count the number of divisors
From: David Hutto
To: masawudu bature
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 AM, masawudu batur
On Tue, Sep 28, 2010 at 12:15 AM, 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.
>
> def evenCount(b) :
> for n in range(x, y+1) :
>
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, y+1) :
count = 0
if n % 2 == 0 :
count += n/3
"Jason MacFiggen" 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 need ttto have a
"Jason MacFiggen" 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 = random.randrang
Jason
Are you trying to prevent negative numbers?
Ben
--- On Wed, 7/28/10, Jason MacFiggen wrote:
From: Jason MacFiggen
Subject: [Tutor] Python Help - How to end program
To: tutor@python.org
Date: Wednesday, July 28, 2010, 9:01 PM
Python keeps looping when it gets past the int 0, how
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 = random.randrange(1, 20)
endProgram = end()
while True:
if mo_hp < 0:
print "The Lich King has
On Mon, 22 Mar 2010 22:31:58 +
laura castañeda 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
> kinda person who dont
"laura castañeda" 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 up to the tutor list, th
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
kinda person who dont give up so i have to solve this challenge or else
i cant move on its
On Mon, Oct 12, 2009 at 2:15 AM, mazher ahmad 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 guess you will have to co
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.
thanx
"IT_ForMe" 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
apple = 2
cart = {"apple":2.00, "orange":2.50, "banana":1.75}
print cart
apple = 2
orange = 2.5
banana = 1.75
totalprice = 0
totalprice = apple + orange + banana
print "your subtotal is 'totalprice'"
taxedprice = (totalprice *.07) + totalprice
print "your final price is 'taxedprice'"
prompt = raw_input("ar
On Wed, Apr 22, 2009 at 11:08 AM, 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 all taxable items.
> Apply a 10% discount if the customer is a s
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 all
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 customer is a student. (hint, instead of asking
the user to input items, set
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
hey there, if anyone can help me with an assignment im stuck in for a fee i
will be grateful
***
Regards.
A K. Hachem
EMAILING FOR THE GREATER GOOD
Join me
___
Tutor maillist - Tutor@python.org
http://mail.p
Artur Sousa wrote:
> What's the difference between:
>
>
> 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'
>
>
> and
>
>
> for a in range(2, 10
http://developer.yahoo.com/python/python-rest.html#post
On 10/21/07, SwartMumba snake <[EMAIL PROTECTED]> wrote:
> I have tried to find out the solution my self, and have failed to do so.
> So here is my problem:
>
> I want to submit text into an edit box on a web page. ie the equivalent of
> me
I have tried to find out the solution my self, and have failed to do so. So
here is my problem:
I want to submit text into an edit box on a web page. ie the equivalent of me
typing text into the edit box and clicking the submit button.
__
Do You
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?
>
___
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.
hi,i need help on a terrible homework assignment. do ul offer hw help?natasha
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> 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
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
> 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 feel
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 ha
> 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 char
> 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
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Natasha Menon
Sent: 08 February 2006 17:19
To: tutor@python.org
Subject: [Tutor] python help
Hi,
I have a few doubts in python programming. C if any of u can help me
out
Hi, I have a few doubts in python programming. C if any of u can help me out. 1. 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 characters from the string and each value is
[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
101 - 135 of 135 matches
Mail list logo