Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Analyse the following code: # definitions of the functions def my Function0 (number): x = 7 + number print (x) def myFunction (number): x =

image text in transcribed
image text in transcribed
Analyse the following code: # definitions of the functions def my Function0 (number): x = 7 + number print (x) def myFunction (number): x = 7 + number return x I def my Function2 (): return x + 4 # the main program, where functions are called X = 5 print (x) my Function (2) print("myfunctionl returns + str(my Functioni (x))) print(x) print("my Function2 returns: + str (my Function2())) Answer the following questions (about the program above) in the online text-editor (add submission will open this editor). No file submission! You must submit your own work. Which of the defined functions are fruitful functions Answer the following questions about the program above) in the online text-editor (add submission will open this editor). No file submission! You must submit your own work. 1. Which of the defined functions are fruitful functions? 2. Which of the defined functions are void functions? 3. Which Python built-in functions are used? For each one is this a fruitful or a void function? 4. In the above program what is the parameter of myFunction? 5. What is the argument when myFunction is called? 6. Which variables are global variables? 7. For each function What are the local variables and the local parameters? 8. What does the program print? (There are 5 print statements!) 9. Redefine myFunction2. Instead of using a global variable it should use a parameter

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

What characteristics should audit committee members possess?

Answered: 1 week ago