Python Functions and Docstrings Flashcard

Flashcard
•
Computers
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is a function in Python?
Back
A block of reusable code that performs a specific task.
2.
FLASHCARD QUESTION
Front
How do you define a function in Python?
Back
def function_name(parameters):
# function body
return value
3.
FLASHCARD QUESTION
Front
What is the purpose of function parameters?
Back
To pass values into a function for it to perform operations on.
4.
FLASHCARD QUESTION
Front
How do you specify default values for function parameters?
Back
Assign a value to the parameter in the function declaration.
5.
FLASHCARD QUESTION
Front
What does the 'return' statement do in a function?
Back
It specifies the value that the function should return.
6.
FLASHCARD QUESTION
Front
What is the purpose of function arguments?
Back
To pass values to a function when it is called.
7.
FLASHCARD QUESTION
Front
How do you pass arguments to a function?
Back
By including them inside the parentheses when defining the function or when calling the function.
Create a free account and access millions of resources
Similar Resources on Wayground
7 questions
Review Dictionary Flashcard

Flashcard
•
12th Grade
8 questions
Programación Básica

Flashcard
•
12th Grade
15 questions
Exam 1 Practice

Flashcard
•
University
11 questions
Function in Python

Flashcard
•
KG
6 questions
Introducción a Python

Flashcard
•
University
13 questions
Introduction To Programming - Lesson Exception Handling

Flashcard
•
11th Grade - University
11 questions
function or not

Flashcard
•
12th Grade - University
10 questions
TIN 10 CHỦ ĐỀ F CẤU TRÚC LẶP

Flashcard
•
11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University