I am a begginer at python and only know the very basics. I was wondereing if anyone was experienced at Python and had any time to help a begginer. As far as first projects go I wanna make a program that can generate random numbers, letters, or words (in 3 different programs of course). If anyone could help, it would be great! :)

Recommended Answers

All 3 Replies

isn't there sa pythin section in this forum ?

[...]I wanna make a program that can generate random numbers, letters, or words (in 3 different programs of course). If anyone could help, it would be great! :)

Probably the first place to look is the random library. Specifically these functions:

>>> import random
>>> print random.random()
0.37449984017
>>> print random.randrange(2,87)
20
>>> print random.choice("ABC")
B
>>> print random.choice(["Ask","what","Python","can","do","for","you"])
what
>>>

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.