What are some common built-in functions in Python?

Functions and String Manipulation

Quiz
•
Computers
•
University
•
Hard
Shashwat Rai
FREE Resource
14 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
input()
int()
len()
print()
str()
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What is the purpose of a function in programming?
To define reusable pieces of code
To take input and return output
To run automatically without being called
To create variables
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print? print(add_two(2,3))
2
3
5
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the keyword 'def' signify in Python?
It defines a function
It defines a variable
It defines a class
It defines a loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if no return statement is given in a function?
The function will return None
The function will return 0
The function will return an error
The function will return an empty string
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between local and global variables?
Local variables are accessible outside the function
Global variables are defined inside a function
Local variables are defined inside a function
Global variables can only be used inside the function
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print? print(len(s)) where s = 'Hello'
4
5
6
Hello
Create a free account and access millions of resources
Similar Resources on Quizizz
12 questions
javaquizvivek

Quiz
•
University
10 questions
Python User Input Quiz

Quiz
•
6th Grade - University
15 questions
Python2

Quiz
•
8th Grade - University
10 questions
Julia

Quiz
•
University
15 questions
Python End of Topic Quiz

Quiz
•
8th Grade - University
14 questions
Lets explore Java

Quiz
•
University
11 questions
Python Data Types Quiz

Quiz
•
10th Grade - University
17 questions
Python Loops

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade