Name:
[002] Ian Ozsvald
Member:
91 months
Authored:
181 videos
Description:
I am the co-founder of ShowMeDo (see http://showmedo.com/about), author of `The Screencasting Handbook <http://thescreencastinghandbook.com>`_ and the founder of the professional screencast production company `ProCasts <http://procasts.co.uk>`_:
.. image:: http://procasts.co.uk/media/procasts_sma ...
Arguments and Return Values 2 [ID:922] (4/6)
in series: Python Beginners - Functions
video tutorial by Ian Ozsvald, added 11/08
Name:
[002] Ian Ozsvald
Member:
91 months
Authored:
181 videos
Description:
I am the co-founder of ShowMeDo (see http://showmedo.com/about), author of `The Screencasting Handbook <http://thescreencastinghandbook.com>`_ and the founder of the professional screencast production ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
Passing arguments in to a function and returning values is the usual way that we pass data around for processing. Here we look at a few ways of getting data into and out of our function. We also look at a common error that will save you from making the same mistake.
# Arguments and Return Values 2 using Python 2.5
# 2008/10/22
def passing_arguments(name_age, some_nbrs):
"""argument passing examples."""
name_age = (name, age)
print name, age, some_nbrs
#return name, age, some_nbrs
name = 'ian'
age = 32
some_nbrs = set([5,6,7])
passing_arguments((name, age), some_nbrs)
#details = passing_arguments((name, age), some_nbrs)
#print details
#print len(details)
#print details[0]
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 259 (since July 30th)
- Plays in last week: 1
- Published: 56 months ago
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
All comments excluding tick-boxed quick-comments
wow, good stuff. This makes C++ look like totalitarian ruler because of its strictness.
great stuff, haven't seen the video on tubles so a little confuseing why the return statement knew to create a tuble
again -very good. Clear and well explained
great as always.
Combining multiple variables into a tuple to be passed as an argument to a function call.
Is that correct?
Well explained but a little confusing (for me anyway) I will read, experiment and watch again and hopefully it will become clear.
Thanks
Although this video was useful, I think it would help to illustrate the concept better if a more concrete/practical example was given for how and why to pass arguments/tuples.
these are very helpful.....Why does the comment box cover the text and how do I get rid of it.
thanks
The ShowMeDo Robot says - this video is now published, thanks for adding to ShowMeDo.
Your video has been edited. This is an automatic post by ShowMeDo.
Your video has been edited. This is an automatic post by ShowMeDo.
