my first “fun” python program

I’m doing a Computer Science subject this semester that is requiring the use of Python as the coding language (as opposed to Java, which we have been taught so far.) For today’s prac, we were required to write a simple guessing game. The computer would generate an int between 0 and 100, and then accepted user input, telling the user if they were warmer, colder or if they won.

I was pretty happy to complete this in half an hour with limited python knowledge (admittedly with the help of Google and an internet connection.)

I will upload this python file after the pracs are over for this week, so people can’t cheat. :)

July 30, 2009 | |

COMMENTS

 

Comments RSS

One Response to “my first “fun” python program”

  1. hari on August 1st, 2009 7:48 am

    I’ve written this game myself. I used ncurses and python, and it’s a nice time-pass.

    I thought it was too trivial to upload to my website though.

    Good that you’re starting to like python. It’s a great programming language and helps you discover the lost fun and pure joy of programming since QBasic (seriously!) apart from the fact that it’s seriously powerful and extensible using modules.

    I’ve written an APT front end in python recently. Did it in two days flat. Data handling is a pleasure in python while it would have taken tons of debugging, messy array-handling and checking in C or C++

Leave a Reply