Selection, String Slicing and Input in Python 3

Selection, String Slicing and Input in Python 3

9th Grade

18 Qs

quiz-placeholder

Similar activities

Acceptable Use Policy

Acceptable Use Policy

6th - 9th Grade

16 Qs

Alat Proses

Alat Proses

9th Grade

20 Qs

BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ

BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ

6th Grade - University

14 Qs

9.1 Homework #3

9.1 Homework #3

9th Grade

20 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

Mrs O's Computer Architecture Quiz

Mrs O's Computer Architecture Quiz

KG - University

13 Qs

Linux: Users and Groups

Linux: Users and Groups

9th Grade - University

14 Qs

Google Tips and Tricks

Google Tips and Tricks

7th - 9th Grade

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