Selection, String Slicing and Input in Python 3

Selection, String Slicing and Input in Python 3

9th Grade

18 Qs

quiz-placeholder

Similar activities

Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự

Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự

9th - 12th Grade

14 Qs

Arduino

Arduino

7th - 9th Grade

15 Qs

Ôn tập học kỳ I

Ôn tập học kỳ I

9th - 12th Grade

20 Qs

History of Computers

History of Computers

6th - 12th Grade

15 Qs

Python Basics

Python Basics

KG - University

16 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Bài kiểm tra giữa kì 2

Bài kiểm tra giữa kì 2

9th - 12th Grade

20 Qs

CPA Revision MCQ1

CPA Revision MCQ1

8th - 9th Grade

20 Qs

Selection, String Slicing and Input in Python 3

Selection, String Slicing and Input in Python 3

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

Vernon Leigh

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to make a decision in Python?

if

else

for

while

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to get user input in Python?

read_input()

get_input()

user_input()

input()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? name = 'Python' print(name[2:4])

th

on

tho

yt

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 5 if x > 3: if x < 7: print('Yes') else: print('No')

Yes

Error

Maybe

No

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to check if a value is present in a string?

for

not

with

in

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? name = 'Python' print(name[-3:])

on

hon

Pyt

tho

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to convert a string to uppercase in Python?

title()

upper()

capitalize()

lower()

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?

Discover more resources for Computers