> I need help writting a program.
> 1) Random string generation
> 2) no repeating letters
> Can anyone help me,please? I am so confused. The only problem is I have to
> use the code that is written there but add on to it.
>
> import random
>
> alphabet = "abcdefghijklmnopqrstuvwxyz"
> myNewString =
On Tue, 2009-09-29 at 20:38 -0700, Jessica Poveda wrote:
> I need help writting a program.
> 1) Random string generation
> 2) no repeating letters
> Can anyone help me,please? I am so confused. The only problem is I
> have to use the code that is written there but add on to it.
>
> import ran
Oops, thanks for catching that one Marty. I thought they both
evaluated to false.
On 9/29/09, Martin Walsh wrote:
> Luke Paireepinart wrote:
>> In this case you are saying "is their input equal to this list with many
>> elements?" and the answer is always going to be No because a string
>> won't
Luke Paireepinart wrote:
> In this case you are saying "is their input equal to this list with many
> elements?" and the answer is always going to be No because a string
> won't be equal to a list unless both are empty.
I know you probably didn't mean this as it reads, or as I'm reading it,
but an
I need help writting a program.
1) Random string generation
2) no repeating letters
Can anyone help me,please? I am so confused. The only problem is I have to use
the code that is written there but add on to it.
import random
alphabet = "abcdefghijklmnopqrstuvwxyz"
myNewString = ""
for lett
> if wellness.strip().lower() in ["well", "fine", "good", "whatever"]:
> note if you strip & lowercase the list it is far more likely you'll match
> your input.
>
> And by "lowercase the list" I meant "lowercase the string" of course :)
___
Tutor maillist
On Wed, Sep 30, 2009 at 1:29 AM, Corey Richardson wrote:
> One of my friends was asking if you could make a game using python, but he
> meant a Graphics, not text game. I was wondering if that was doable.
>
Yes, there are many libraries available for doing this. Pyglet is my
favorite, but Pygam
On Tue, Sep 29, 2009 at 6:00 PM, Corey Richardson wrote:
> I haven't looked into this, but could you make a real time image using
> python? I think it would be most hard
>
I haven't looked into this, but perhaps your questions are too vague? I
think that may be the case
What do you mean
I haven't looked into this, but could you make a real time image using
python? I think it would be most hard
Anyway, I am having trouble with int(). I am trying to
int(raw_input("some number")), but it returns
Traceback (most recent call last):
File "C:/Users/Quick-Start/Documents/Python Do
wrobl...@cmich.edu wrote:
I'm trying to make a very simple example to show alternate execution... if a
number is divisible by 3 it will say so and if it isnt, it will say so. Heres my
program
n= raw_input("enter a number= ")
def divisible(n):
if n%3 == 0:
print n, "is divisibl
On Tue, Sep 29, 2009 at 11:40 PM, Corey Richardson wrote:
> I got suggested to use this format for my code, as it was shorter and
> prettier. But It dun work!
> if wellness != ["Well","Fine","Good", "OK", "ok", "Ok", "Great", "Awesome",
> "Epic"]:
> print "Oh, I'm sorry you are not feeling well
2009/9/29 Corey Richardson :
> I got suggested to use this format for my code, as it was shorter and
> prettier. But It dun work!
> if wellness != ["Well","Fine","Good", "OK", "ok", "Ok", "Great", "Awesome",
> "Epic"]:
> print "Oh, I'm sorry you are not feeling well."
> areYouOk = raw_input("I
I got suggested to use this format for my code, as it was shorter and
prettier. But It dun work!
if wellness != ["Well","Fine","Good", "OK", "ok", "Ok", "Great",
"Awesome", "Epic"]:
print "Oh, I'm sorry you are not feeling well."
areYouOk = raw_input("I guessed correct, right?")
if areY
Eduardo Vieira wrote:
Hello, I have a csv file,
a broken csv file
using the ";" as a delimiter. This file
contains addresses. My problem is that some fields are missing in some
rows and I would like to normalize the rows for a smoother import into
Excel, for example.
Here is an example. This i
On Tue, Sep 29, 2009 at 10:59 AM, wrote:
> I'm trying to make a very simple example to show alternate execution... if
> a
> number is divisible by 3 it will say so and if it isnt, it will say so.
> Heres my
> program
>
> n= raw_input("enter a number= ")
> def divisible(n):
>if n%3 == 0:
>
I'm trying to make a very simple example to show alternate execution... if a
number is divisible by 3 it will say so and if it isnt, it will say so. Heres
my
program
n= raw_input("enter a number= ")
def divisible(n):
if n%3 == 0:
print n, "is divisible by 3"
else:
p
Hello, I had a problem with a script yesterday that made me puzzled.
My time zone is US Mountain Time. This script was running nice last
week, but yesterday it reported the date of today instead
So, yesterday at 5:20pm this line:
hoje = time.strftime("%a, %b %d, %Y", time.gmtime())
Gave me this: "
You could invert your if-expressions, e.g. instead of
if query_company_name:
...
you could write
if not query_company_name:
return adresses, company
...
This way you could save some indentation.
If you want to get rid of the for loops, you could look at list
comprehensions, e
18 matches
Mail list logo