Click to See Complete Forum and Search --> : My first python program


The Linux Kid
12-08-2003, 02:51 PM
Take a look at my first python program!

Try and guess the number without looking at the code.

The Linux Kid

Below is a new version of the program. Only 7 guesses now!

bryan.6
12-08-2003, 03:03 PM
by the way, not knowing the number in advance, mathematically it should take you no more than 7 guesses if you do it right, and most definitely not 30!

The Linux Kid
12-08-2003, 03:04 PM
Ok, i'll lower it, that was just for testing to make sure it worked. Forgot to lower it ;) Look in my first post for the updated program!

bryan.6
12-08-2003, 04:54 PM
haha, i wasn't saying you had to change it, just a little tidbit of knowledge.
something you might want to look into now though is figuring out the random number generator for that program.

roamingnomad
12-08-2003, 05:00 PM
I see you're more of the gamer type... :p

When I was first playing around with python (and, btw, I haven't since, even though it's a great language) I was doing a bunch of hard math problems. I didn't feel like memorizing the primes, so I made a prime number program. And have I used it!!!

:o but let's not get off topic:p

bryan.6
12-08-2003, 05:02 PM
ha, i remember my first (and i think last) python program was to take the hours i worked in a week and calculate my check, tax, and all that crap (cause i was pretty sure my boss ripped people off, and i didn't want to be one of them)

The Linux Kid
12-08-2003, 10:08 PM
Originally posted by bryan.6
ha, i remember my first (and i think last) python program was to take the hours i worked in a week and calculate my check, tax, and all that crap (cause i was pretty sure my boss ripped people off, and i didn't want to be one of them)
^^^^^^ - sounds like a good idea to me!!

Anyway, forgot to say that this isn't the first programming language I have learnt. I have self taught myself PHP, HTML, JavaScript, Visual Basic, VBScript, ActionScript, QBasic + some more.

Thanks for the comments,

The Linux Kid

bryan.6
12-09-2003, 02:32 AM
yeah... it goes SO much quicker when you've learned another language, huh? i'm told it works the same way with linguistic languages, but don't have the experience of that.

The Linux Kid
12-09-2003, 03:08 AM
Learning languages before does make it easy, I agree.