Re: [Tutor] Help me please

2006-03-15 Thread Kent Johnson
yogeshwarran Nadeson wrote:
> Hello,
> 
> I am a newbie in python programming without previous programming 
> experience.Here i would like to ask
> a question based on the exercises given by Josh Cogliatti in his 
> tutorial.I'll paste the question.Hope you can help me to solve it.I'd 
> like to end it by saying thanks for all yourr help.

Have you written a program that uses loops? Could you write a program 
that uses a loop to print "Hello" three times?

Kent

> 
> *:Modify the password guessing program to keep track of how many times 
> the user has entered the password wrong. If it is more than 3 times, 
> print ``That must have been complicated.'' *
> 
> This is the previous password program:
> 
> Password.py
> 
> # Waits until a password has been entered.  Use control-C to break out with 
> out
> # the password
> 
> #Note that this must not be the password so that the 
> # while loop runs at least once.
> password = "foobar"
> 
> #note that != means not equal
> while password != "unicorn":
> password = raw_input("Password:")
> print "Welcome in"

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Help me please

2006-03-14 Thread yogeshwarran Nadeson
Hello, I am a newbie in python programming without previous programming experience.Here i would like to ask a question based on the exercises given by Josh Cogliatti in his tutorial.I'll paste the question.Hope you can help me to solve it.I'd like to end it by saying thanks for all yourr help. :Modify the password guessing program to keep track of how many times the user has entered the password wrong. If it is more than 3 times, print ``That must have been complicated.'' 
This is the previous password program:
Password.py # Waits until a password has been entered.  Use control-C to break out with out
# the password

#Note that this must not be the password so that the 
# while loop runs at least once.
password = "foobar"

#note that != means not equal
while password != "unicorn":
password = raw_input("Password:")
print "Welcome in"

Password.py # Waits until a password has been entered.  Use control-C to break out with out
# the password

#Note that this must not be the password so that the 
# while loop runs at least once.
password = "foobar"

#note that != means not equal
while password != "unicorn":
password = raw_input("Password:")
print "Welcome in"

 

-- 
___
Search for businesses by name, location, or phone number.  -Lycos Yellow Pages
http://yp.lycos.com

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] help me please!!!

2005-03-11 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 2005-03-11 20:21:
ok i just restarted my pc and it works now thank you ..ok when i go to the 
start menu then go to all programs then to python 2.4 it gives me five things ok 
it says IDLE (python GUI)
Module Docs
python (command line)
python manuals
uninstall python
 When i click on IDLE (python GUI) the screan pops up and at the top it say 
python shell

*PLEASE* Reply to All.
(For the reasons Danny Yoo mentioned. More than once.)
Yes, the window that pops up and is entitled 'Python Shell' is IDLE's 
enhanced python shell. I believe that 'python shell' (without further 
modification) is conventionally understood to mean the bare Python 
shell one gets from clicking on  Python (command line). (That is the 
same you get by opening a DOS box and typing Python.)

The IDLE shell is only a part of the IDLE program. (Try File->New 
Window. Now you've got an IDLE editor window where you can write, 
save, and load scripts.[1].) The IDLE shell is enhanced by things such 
as syntax highlighting, and, compared to the bare shell on my Windows 
version at least, a scrollable and saveable history. There are also 
things that won't work well from the IDLE shell -- since it is itself 
a Python Tkinter GUI program, running a Tkinter GUI program from 
within it doesn't work too well.

[1] To stave off future worries -- when saving a script from IDLE, you 
have to explicitly give it the .py extension if you want your script 
to have it. (You do -- it makes it runable in Windows by double-click 
on the icon and tells IDLE to use the Python syntax highlighting which 
makes editing Python code much easier.)

Best,
Brian vdB
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] help me please!!!

2005-03-11 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 2005-03-11 19:00:
Ok some thing is messed up.. when i try to open the python shell i get a 
error meesage saying  socket error:connection refused and the head line at the 
top says IDLE subprocess error.. and then the python shell pops up with a 
error message on it saying. IDLE's subprocess didn't make connention. 
Either IDLE can't start or personal firewall software is blocking the connection. 
and the head line at the top says subprocess startup error..
and i did not even have to be online to use to befor i don't know what it 
problem is please help me..lol..thank you!!!

Hi,
IDLE isn't the python shell.
You appear to be on Windows XP. A python shell is what you get when 
you open a command prompt (a DOS prompt on older Windows version; I 
don't know XP) and type python.

IDLE is a basic Integrated DeLopment Environment with an enhanced shell.
The problem you are experiencing with IDLE is a known bug. When it 
occurs, open up your task manager (CTRL + ALT + DEL on pre-XP Windows 
at least) and look for a Python related process (one with python in 
the name). Kill it. Try launching IDLE again. You should be fine 
thereafter.

There is more information about this bug (and a more permanent fix) in 
one or both of the archives of this list and of the edu-sig list.

Last, as a windows user, you might be interested in PythonWin. It is 
part of the Windows extensions by Mark Hammond 
. The editor is a bit nicer 
and more featurefull than that of IDLE. If you try that and have 
problems running it consistently (I did) see 


Best,
Brian vdB
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] help me please!!!

2005-03-11 Thread Jeff420harris00
Ok some thing is messed up.. when i try to open the python shell i get a error meesage saying  socket error:connection refused and the head line at the top says IDLE subprocess error.. and then the python shell pops up with a error message on it saying. IDLE's subprocess didn't make connention. Either IDLE can't start or personal firewall software is blocking the connection. and the head line at the top says subprocess startup error..
and i did not even have to be online to use to befor i don't know what it problem is please help me..lol..thank you!!!
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor