Python Python Python
Python you either get it or you don't, But you can get it with a lot of practice python could be your friendwhat will the result be? i think that many of you would know this is a simple python programme calculating two values and printing it onto the screen. PLEASE GIVE AN ANSWER TO THIS QUESTION IT IS VERY SIMPLE
what would be the printed result:
x=100
y=150
print x + y
another example is:
while output == False
output = False
name = raw_input('what is your name')
if name = 'ahmed':
output = True
else:
print 'try again'
output = False
this is a simple while loop which means while the output which we anything but in this case output is False it will repeat unless the name is = ahmed then the output is True meaning it will continue to whetever is next in this case it ends as there is nothing after it
However we have put in else meaning if the name is not ahmed it shall repeat asking for the name as the output is False and it will ask you to try again.
BELOW ARE LINKS TO USEFUL SITES WHERE YOU WILL GET LOTS OF INFORMATION REGARDING PYTHON
http://forums.devshed.com/python-programming-11/
http://www.effbot.org/zone/librarybook-index.htm
http://wiki.python.org/moin/BeginnersGuide?action=AttachFile&do=get&target=PythonDoc%26Start16DEC2010.pdf
250
ReplyDeleteI think thats was a bit too easy :)
ReplyDeletenice :)
ReplyDelete