[Tutor] Newbie!! many questions
AquaRock7@aol.com
AquaRock7@aol.com
Mon, 29 Jan 2001 20:08:02 EST
--part1_3b.fbc8bd3.27a76df2_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
!). There is a way to define and call functions in Python, but is there a
way to define and call a subroutine? Or a way to jump to another line of
code? i.e.:
n = input("Type a number: ")
if n > 0:
GOTO negativemsg
elif n < 0:
GOTO posativemsg
else:
GOTO zeromsg
negativemsg: print "Negative"
positivemsg: print "Positive"
zeromsg: print "Zero"
so I dont have to write repeated code over and over...
2). sys.stdout and sys.stdin
what are they!? ok, sys.stdout is where the print statement goes...
so how can I use that to my advantage? How can I manip[ulate this to my
advantage?
3). Is there a graphics library for Python? To go along with the thread
about making games in Python... Not games that use OS-like grpahics, like
Tk... Like commercial games with grpahics lilke that. Like so you can plot a
pixel on the screen at coordinate x,y, color=red. Microsoft QBasic did that
(my first programming language(i know its obsolete, but its great for
beginners)). Or locate text anywhere besides the next line down. Maybe
there is a way to use DirectX with python?
4). making executables... so I can run it without Python installed! How?
Someone posted about Freeze... I never heard of that, would someone care to
explain? Is that what I am looking for?
Thank you, ~Dustin
--part1_3b.fbc8bd3.27a76df2_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
<HTML><FONT FACE=arial,helvetica><FONT SIZE=2>!). There is a way to define and call functions in Python, but is there a
<BR>way to define and call a subroutine? Or a way to jump to another line of
<BR>code? i.e.:
<BR>
<BR>n = input("Type a number: ")
<BR>if n > 0:
<BR> GOTO negativemsg
<BR>elif n < 0:
<BR> GOTO posativemsg
<BR>else:
<BR> GOTO zeromsg
<BR>
<BR>negativemsg: print "Negative"
<BR>positivemsg: print "Positive"
<BR>zeromsg: print "Zero"
<BR>
<BR>so I dont have to write repeated code over and over...
<BR>
<BR>2). sys.stdout and sys.stdin
<BR> what are they!? ok, sys.stdout is where the print statement goes...
<BR>so how can I use that to my advantage? How can I manip[ulate this to my
<BR>advantage?
<BR>
<BR>3). Is there a graphics library for Python? To go along with the thread
<BR>about making games in Python... Not games that use OS-like grpahics, like
<BR>Tk... Like commercial games with grpahics lilke that. Like so you can plot a
<BR>pixel on the screen at coordinate x,y, color=red. Microsoft QBasic did that
<BR>(my first programming language(i know its obsolete, but its great for
<BR>beginners)). Or locate text anywhere besides the next line down. Maybe
<BR>there is a way to use DirectX with python?
<BR>
<BR>4). making executables... so I can run it without Python installed! How?
<BR>Someone posted about Freeze... I never heard of that, would someone care to
<BR>explain? Is that what I am looking for?
<BR>
<BR>Thank you, ~Dustin</FONT></HTML>
--part1_3b.fbc8bd3.27a76df2_boundary--