[Tutor] Protege and python

2009-04-17 Thread mbikinyi brat
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python and Semantic web

2009-04-17 Thread mbikinyi brat
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Functions output

2009-04-17 Thread mbikinyi brat
Dear all, Here are two functions printme and change quite spaced apart. When executed the output in bold are joined. What can I do so that the results are separate in two blocks?   #Function definition is here def printme(str):     "This prints a passed string into this function"     print str  

[Tutor] for loop

2009-04-16 Thread mbikinyi brat
Dear ALL, I am a beginner in python and I just copied the code in blue below and execute and had the result in green. Then I thought letter should be a special word in python. Then I now replace letter whith chic  and yet the same results is obtained. I cannot reconcile them. Can someone explain

[Tutor] print output

2009-04-16 Thread mbikinyi brat
  Dear ALL, I have defined variables as below and when I call them using the print function, I have something discontinous as in pink colour. How do I call it so that my output should be as in blue >>> counter=101 >>> miles=1000 >>> name="joe" >>> print counter 101 >>> print miles 1000 >>> print

[Tutor] importance of Docstring

2009-04-16 Thread mbikinyi brat
Dear ALL, What is really the importance of Docstring in Python??? Regards, Henry ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] colours in IDLE

2009-04-15 Thread mbikinyi brat
Dear ALL, When you type a code in IDLE-Python, they appear in different colours. For instance:  def factorial(n):  if n==0:   return 1  else:   recurse=factorial(n-1)   result=n*recurse   return result factorial in blue and return and else and result in red. Any significance to these colours?   Reg

[Tutor] calculate area of a circle

2009-04-15 Thread mbikinyi brat
Hi All, This is a code I have written to calculate the area of a circle. def area(radius):  temp=math.pi*radius**2  return temp   I now call it by entering area(12) at the prompt in IDLE. This is the error message I get. Can someone help please? Traceback (most recent call last):   File "", line

[Tutor] OOP

2009-04-15 Thread mbikinyi brat
Dear ALL, I am a python beginner and has never programmed and has been struggling to understand how to create objects or classes in python. Can anyone help with any concrete example. I have read most recommended textbooks but still have difficulties figuring what it is all about.   Thanks, Henry