A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/063295.html below:

Example of Function

Example of Function Example of FunctionVolucris volucris at hotmail.com
Tue Apr 24 00:27:55 EDT 2001
>>> def welcome():
...  #a funtion with no return value (a procedure)
...  print '***********'
...  print 'Hello World'
...  print '***********'
...
>>> welcome()
***********
Hello World
***********
>>> def double(num):
...  #a function in the traditional sense (has a return value)
...  new_num = num * 2
...  return new_num
...
>>> my_num = double(6)
>>> print my_num
12

"alki" <webmaster at pawntastic.com> wrote in message
news:DV5F6.4485$5t3.336201 at newsread1.prod.itd.earthlink.net...
> Will someone please give me how a function is written and how it's used?
> Thx.
>
>



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4