April 30th, 2004, 09:18 PM
newbie needs details
could someone please give me detailed comments (#) for the lines of code i have numbered.
print 'welcome to the greek eatery'
print 'we are full'
money = int(raw_input('how much to tip?')) #1
if money > 0: #2
print 'we have a table'
print 'sit down and wait'
raw_input('press the enter key to exit')
Last edited by netytan; May 1st, 2004 at 12:32 AM.
Reason: Added code tags, perfect please see the sticky thread on asking for help.
April 30th, 2004, 09:54 PM
#1: raw_input() gets input in the form of a string from the standard input (from the keyboard most likely) and int() converts it to an integer.
#2: If the variable "money" is greater than 0, print "we have a table" to the standard output (to the screen most likely).
#3: If money is not greater than 0 then print "sit down and wait"
Use [ code ] [/ code] tags next time, please.
April 30th, 2004, 11:00 PM
newbie ? code tags & count
newbie - explain code tags and
what does the word ' count ' do in my previous program and what does it do.
thanks for earlier help.
i know count is not called a word, i'm trying to find the right
term for it.
Use the [ code ] and [/ code ] tags (without the spaces) around your code so it includes the tabs, etc.
As for 'count', I don't see it in your previous program, but the word you are probably looking for is "variable".
I dont see it either if you could make the section your talking about bold in the example above that would be a nice start. Also, i've added code tags around your previous code for you this time . Check out this thread for more info:
Take care guys,
P.S. Thanks BSD.
thanks NetBSD, that the word I was looking for.