Functions and String Manipulation

Functions and String Manipulation

University

14 Qs

quiz-placeholder

Similar activities

FSA,DFA dan NFA

FSA,DFA dan NFA

University

15 Qs

Computer Basics 2 - CESA

Computer Basics 2 - CESA

7th Grade - University

10 Qs

Software Testing

Software Testing

University

10 Qs

EC335 - Quiz 1

EC335 - Quiz 1

University

10 Qs

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

C++ Array Quiz

C++ Array Quiz

University

10 Qs

quiz pertemuan 2 asik ddp

quiz pertemuan 2 asik ddp

University

15 Qs

Information System and Modern Organization part 1

Information System and Modern Organization part 1

University

14 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?