On Mar 7, 2014, at 6:16 PM, Lee Harr wrote:
>> I am completely new to programming so thanks for any help!
>
> Not sure it will help, and hopefully I am not self-promoting too much,
> but this may be of interest to you:
>
> http://pynguin.googlecode.com/
>
> http://code.google.com/p/pynguin/wi
On Mar 2, 2014, at 8:52 PM, Ben Finney wrote:
>
> Once again, Scott, this discussion should be happening at the Tutor
> forum. Please don't continue the fragmentation of this discussion; keep
> the discusson over at the Tutor forum.
Sorry, I was just replying to replies to my post. I get the po
On Mar 2, 2014, at 6:40 PM, Scott W Dunning wrote:
This is what Im having trouble with now. Here are the directions I’m stuck on
and what I have so far, I’ll bold the part that’s dealing with the instructions
if anyone could help me figure out where I’m going wrong.
Thanks!
from random
On Mar 1, 2014, at 6:16 PM, Chris Angelico wrote:
>
> Another consideration: Susan's code is written for Python 3, but you
> seemed to be using Python 2. You'll find that the code won't even run
> on your version of Python.
>
> (If you have the chance, ask if the course writer would consider
>
On Mar 2, 2014, at 12:38 AM, Larry Hudson wrote:
>
> Another 'problem' is what you failed to mention in your post, but is apparent
> from the instructions that you posted -- this assignment is NOT the complete
> program, just the beginning of one. Your instructor obviously wants you to
> wor
On Mar 1, 2014, at 9:35 AM, Dennis Lee Bieber wrote:
> Without loops, one part of your assignment is going to be tedious,
> unless the intent is to only allow for one guess per run.
No, 10 guesses per game. Yes very tedious and repetative.
>
>> from random import randrange
>> randrange(1,
On Mar 1, 2014, at 11:03 AM, Susan Aldridge wrote:
> Try this
>
> def guess1(upLimit = 100):
>import random
>num = random.randint(1,upLimit)
>count = 0
>gotIt = False
>while (not gotIt):
>print('Guess a number between 1 and', upLimit, ':')
>guess= int(input())
Hello, i am working on a project for learning python and I’m stuck. The
directions are confusing me. Please keep in mind I’m very ne to this. The
directions are long so I’ll just add the paragraphs I’m confused about and my
code if someone could help me out I’d greatly appreciate it! Also, w
I understood what you meant because I looked up loops in the python
documentation since we haven’t got there yet in school.
On Feb 23, 2014, at 6:39 PM, alex23 wrote:
> On 24/02/2014 11:09 AM, Mark Lawrence wrote:
>> On 24/02/2014 00:55, alex23 wrote:
>>>
>>> for _ in range(5):
>>> f
On Feb 23, 2014, at 12:59 AM, Ben Finney wrote:
>
> You should ask question like this on the “python-tutor” forum.
Thanks Ben, I wasn’t aware of PythonTutor.
--
https://mail.python.org/mailman/listinfo/python-list
On Feb 23, 2014, at 1:44 AM, Steven D'Aprano
wrote:
>
> Sorry, I don't really understand your question. Could you show an example
> of what you are doing?
>
> Do you mean "add 5" or "*5"? "Add *5 doesn't really mean anything to me.
Sorry I forgot to add the code that I had to give an example
Hello,
I had a question regarding functions. Is there a way to call a function
multiple times without recalling it over and over. Meaning is there a way I
can call a function and then add *5 or something like that?
Thanks for any help!
Scott
--
https://mail.python.org/mailman/listinfo/pytho
On Feb 21, 2014, at 9:30 PM, Dave Angel wrote:
You’re awesome David! Thanks for taking the time to not only help answer my
question but helping me to understand it as well!!
Scott
--
https://mail.python.org/mailman/listinfo/python-list
On Feb 21, 2014, at 7:13 PM, Dave Angel wrote:
> Scott W Dunning Wrote in message:
>>
>> On Feb 20, 2014, at 11:30 PM, Dave Angel wrote:
>>
>>> Look at turtle.begin_fill and turtle.end_fill
>>>
>>> That's after making sure your star is a
On Feb 20, 2014, at 11:30 PM, Dave Angel wrote:
> Look at turtle.begin_fill and turtle.end_fill
>
> That's after making sure your star is a closed shape.
So, this is what I have so far and it “works” but, it fills in the star with
black and as you can see below I am trying to fill it in wit
Hello,
I am trying to make a function that allows me to color in a star that was drawn
in Turtle. I just keep having trouble no matter what I do. I’ll post the code
I have for the star (just in case). The ultimate goal is to create a script
that’ll draw the American flag (we’re learning this
On Feb 20, 2014, at 9:41 PM, Scott W Dunning wrote:
> Hello,
>
> I am trying to make a function that allows me to color in a star that was
> drawn in Turtle. I just keep having trouble no matter what I do. I’ll post
> the code I have for the star (just in case). The ulti
On Feb 11, 2014, at 6:36 PM, Chris Angelico wrote:
>
> The real question is: What do you expect that symbol to mean?
>
> Its actual meaning is quite simple. In long division, dividing one
> number by another looks like this:
Yeah I understand what the % means. It just confused me that 1%10 was
On Feb 11, 2014, at 6:51 PM, Christopher Welborn wrote:
> I think because 1 is evenly divisible by 10 exactly 0 times with a 1
> remainder. I mean int(1 / 10) == 0, with a 1 remainder.
> The same is true for all numbers leading up to 10.
>
Actually I think I get it now. I think I was not really
I just have a simple question. I don’t understand why 1%10 = 1?
--
https://mail.python.org/mailman/listinfo/python-list
On Feb 8, 2014, at 11:30 PM, Chris Angelico wrote:
OH, I think I figured it out.
> time = int(raw_input("Enter number of seconds: “))
100
> seconds = time % 60
Remainder of 40 <- for seconds.
> time /= 60
Here you take 100/60 = 1 (which = time for the next line).
> minutes = time %
On Feb 8, 2014, at 11:30 PM, Chris Angelico wrote:
I have one more question on this if you don’t mind. I’m a bit confused on how
it works this way without it being in seconds? I’ll answer below each step of
how it seems to work to me.
> How to do it from the small end up:
>
> time = int(ra
On Feb 8, 2014, at 6:46 PM, Chris Angelico wrote:
> That's certainly effective. It's going to give you the right result. I
> would be inclined to start from the small end and strip off the
> seconds first, then the minutes, etc, because then you're working with
> smaller divisors (60, 60, 24, 7 i
On Feb 8, 2014, at 6:46 PM, Chris Angelico wrote:
> No, I'm not a teacher by profession, but I was homeschooled, and since
> I'm the second of seven children [1], I got used to teaching things to
> my siblings. Also, every week I run a Dungeons and Dragons campaign
> online, which requires simila
On Feb 7, 2014, at 11:29 PM, Chris Angelico wrote
> Close! But if you print out foo and bar, you'll see that you're naming
> them backwards in the second one. The last digit is the remainder
> (modulo), the rest is the quotient.
So, this is more like what you’re talking about?
>>> first = numbe
#x27;,
seconds, 'seconds'
Not sure if that’s the correct way to do it but it works! If there is any
other advice I’ll take it.
On Feb 7, 2014, at 11:29 PM, Chris Angelico wrote:
> On Sat, Feb 8, 2014 at 5:27 PM, Scott W Dunning wrote:
>> Ok, so it this what you’re
On Feb 8, 2014, at 5:56 PM, Chris Angelico wrote:
>
> Carry on with that method - work out the number of minutes, and then
> the "hours_etc" which has the rest. Then do the same to split off
> hours, and then days. See how you go!
I did it similar to that but I went backwards. I started with n
>
> On Feb 7, 2014, at 10:10 PM, Chris Angelico wrote:
>>
>> number = int(raw_input("Enter a five-digit number: "))
>>
>> Now we begin to split it up:
>>
>> foo = number % 10
>> bar = number / 10
>>
Ok, so it this what you’re talking about?
number = int(raw_input(“Enter a five digit number:
On Feb 7, 2014, at 10:10 PM, Chris Angelico wrote:
>
> You should be able to get this to the point of writing out five
> separate values, which are the original five digits. Each one is worth
> 10 of the previous value. At every step, do both halves of the
> division.
What do you mean by at ea
On Feb 7, 2014, at 10:10 PM, Chris Angelico wrote:
> It might be easiest to think in terms of a single "divide into
> quotient and remainder" operation. Let's leave aside
> weeks/days/hours/minutes/seconds and split a number up into its
> digits. (This is actually not as useless as you might thi
I have a question that was a part of my homework and I got it correct but the
teacher urged me to do it using the % sign rather than subtracting everything,
for some reason I’m having issues getting it to calculate correctly. I’ll put
the question below, and what I originally had and below that
>
> A few things that will make your communications more fruitful:
>
> * Please don't top-post. Trim the quoted material to the parts relevant
> for your response, and respond inline like a normal discussion.
Oh, ok sorry about that. Like this?
>
> * Ensure that your message composer does
. Also, not really clear on the reasoning
behind changing the int to a string?
On Feb 6, 2014, at 9:45 PM, Chris Angelico wrote:
> On Fri, Feb 7, 2014 at 3:09 PM, Scott W Dunning wrote:
>> Is this what you’re talking about?
>>
>> minutes = “3”
>> seconds = “1
what exactly is the “%d:%02d”% saying?
On Feb 6, 2014, at 6:25 PM, Roy Smith wrote:
> In article ,
> Scott W Dunning wrote:
>
>> I am having trouble figuring out how to remove spacesŠ.
>>
>> Assume variables exist for minutes and seconds. Each variable is an
at 12:22 PM, Scott W Dunning wrote:
>> Assume variables exist for minutes and seconds. Each variable is an integer.
>> How would you create a string in the format,
>>
>> 3:11
>>
>> with no spaces. where 3 is minutes and 11 is seconds.
>>
>>
I am having trouble figuring out how to remove spaces….
Assume variables exist for minutes and seconds. Each variable is an integer.
How would you create a string in the format,
3:11
with no spaces. where 3 is minutes and 11 is seconds.
Obviously when I…
print minutes, “:”, seconds
I get 3
Yeah you’re right I didn’t even notice that. For some reason I just added the
60 instead of using quantity which had been defined.
On Feb 1, 2014, at 8:50 AM, Dennis Lee Bieber wrote:
> On Fri, 31 Jan 2014 22:18:34 -0700, Scott W Dunning
> declaimed the following:
>
>>
Any chance you guys could help with another question I have? Below is a code
to a different problem. The only thing I don’t understand is why when
calculating the 'discounted price’ you have to subtract 1? Thanks again guys!
price_per_book = 24.95
discount = .40
quantity = 60
discounted_pri
Ok cool, thanks Denis!
On Jan 31, 2014, at 8:02 PM, Denis McMahon wrote:
> On Thu, 30 Jan 2014 21:12:19 -0800, scottwd80 wrote:
>
>> Here is the question that was asked and below that I'll paste the code I
>> have so far.
>
> The following is a reasonably but not highly obfuscated short solut
uot;:", seconds,”am"
On Jan 31, 2014, at 5:57 PM, Chris Angelico wrote:
> On Sat, Feb 1, 2014 at 11:42 AM, Scott W Dunning wrote:
>> Also, any help on how to get the hours and seconds into double digits that
>> would be cool too. 00:00:00
>
> Once you can divide
, Scott W Dunning wrote:
> Any chance you guys could help with another question I have? Below is a code
> to a different problem. The only thing I don’t understand is why when
> calculating the 'discounted price’ you have to subtract 1? Thanks again
> guys!
>
>
Also, any help on how to get the hours and seconds into double digits that
would be cool too. 00:00:00
On Jan 31, 2014, at 1:30 AM, Chris Angelico wrote:
> On Fri, Jan 31, 2014 at 7:17 PM, Gregory Ewing
> wrote:
>> sjud9227 wrote:
>>>
>>> Doesn't
>>> assigning seconds/(60*60) mean that calcu
Also, can any of you reccommend sites that may have little “projects” that I
could work on to help me learn python better?
On Jan 31, 2014, at 1:30 AM, Chris Angelico wrote:
> On Fri, Jan 31, 2014 at 7:17 PM, Gregory Ewing
> wrote:
>> sjud9227 wrote:
>>>
>>> Doesn't
>>> assigning seconds/(
You guys are awesome! I think I was over complicating things for one. Plus I
was looking at some code I wrote for another problem that asked to put in the
number of seconds to calculate the problem and I didn’t need some of the things
I added to this problem. Anyways, you guys have given me a
So, this is what I came up with. It works, which is good but it’s a little
different from a few things you guys had mentioned. For one, I got the correct
time by calculating the number of time run and converting that into seconds
then back out to hr:mn:sc. I didn’t calculate from midnight. T
45 matches
Mail list logo