Computer Science > EXAM > CS 1101 Programming Fundamentals - Term 5, 2018-2019 (All)
Create your own Python code examples that demonstrate each of the following. Do not copy examples from the book or any other source. Try to be creative with your examples to demonstrate that you inv... ented them yourself. Example 1: DeÕne a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter. Example 2: Call your function from Example 1 three times with diàerent kinds of arguments: a value, a variable, and an expression. Identify which kind of argument is which. Example 3: Create a function with a local variable. Show what happens when you try to use that variable outside the function. Explain the results. Example 4: Create a function that takes an argument. Give the function parameter a unique name. Show what happens when you try to use that parameter name outside the function.21/8/2019 CS 1101 - AY2019-T5: Discussion Unit 2 https://my.uopeople.edu/mod/forum/discuss.php?d=230935 2/54 Explain the results. Example 5: Show what happens when a variable deÕned outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs. [Show More]
Last updated: 2 years ago
Preview 1 out of 54 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
exam questions and correct answers
By Prof.Pierro 3 years ago
$13
12
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jun 11, 2021
Number of pages
54
Written in
This document has been written for:
Uploaded
Jun 11, 2021
Downloads
0
Views
109
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·