Functions and String Manipulation

Functions and String Manipulation

University

14 Qs

quiz-placeholder

Similar activities

Memory-Mobo-Hard/Software

Memory-Mobo-Hard/Software

University

18 Qs

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

SQL Quiz

SQL Quiz

University

18 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

Adobe Photoshop

Adobe Photoshop

University

10 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Google Aptitude Test

Google Aptitude Test

KG - University

10 Qs

Functions and String Manipulation

Functions and String Manipulation

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Shashwat Rai

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

14 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What are some common built-in functions in Python?

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?