PDA

View Full Version : Python Problem: Please Help!


kickstar
June 21st, 2006, 07:52 PM
hello all,

im a programming newbie and i'v been following the "Byte of Python" guide which i think is really good.

however...

i'v written this small guessing game ( find attached )
but when i enter a number it executes the corresponding code - then executes the "Well done!" bit and exits back to terminal prompt.

it's the same (pretty much) as this one:

http://www.byteofpython.info/read/if-statement.html

i'v run this one too and it has the same problem, whats going on? is the code wrong or something?

please help because i hate getting stuck

thanx!

kickstar
June 21st, 2006, 07:58 PM
oh, sorry people...

if you look on the next page of that guide it tells you that you have to incorperate a while loop into the code to get the effect i was after... sorry!

a question though if you will!

is the Linux kernel or bits of it coded in Python?

and also what is the best use for python (GUI, web-based etc.)

loell
June 21st, 2006, 08:28 PM
i think the linux kernel is written in c
python is an all purpose programming language
though IMHO, web programming in python is easier than gui python app..

DirtDawg
June 21st, 2006, 09:00 PM
I use Python to write stoopid little text games, play jokes on friends, and scripts that perform redundant tasks to save me time.

SilverTab
June 21st, 2006, 09:40 PM
Python with GTK (PyGTK) and glade makes it easy to develop good looking app on Linux!... There are some nice apps in the repositories that are coded in PyGTK (Alacarte Menu Editor for example)

Personally it's my language of choice for GUI/App development on Linux (Note: I'm only developing small tools, gui for config files, etc etc..) but it works like a charm!