CPT C04 Programming (math, random, string, logical)

CPT C04 Programming (math, random, string, logical)

10th Grade

32 Qs

quiz-placeholder

Similar activities

Computer Basics

Computer Basics

9th - 12th Grade

28 Qs

Workplace Health and Safety Quiz

Workplace Health and Safety Quiz

10th Grade

28 Qs

Kiến thức về thông tin và dữ liệu (Lớp 10)

Kiến thức về thông tin và dữ liệu (Lớp 10)

10th Grade - University

35 Qs

kuis ASAS KELAS 7

kuis ASAS KELAS 7

7th Grade - University

30 Qs

Excel Foundations Quiz 1.30

Excel Foundations Quiz 1.30

10th Grade

35 Qs

Teknologi Informatika 7A

Teknologi Informatika 7A

7th Grade - University

30 Qs

Python Basics Test

Python Basics Test

10th Grade

30 Qs

Google Sheet

Google Sheet

10th Grade - University

35 Qs

CPT C04 Programming (math, random, string, logical)

CPT C04 Programming (math, random, string, logical)

Assessment

Quiz

Information Technology (IT)

10th Grade

Practice Problem

Medium

Created by

woai chemhepython

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

32 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output of the following Python code? (Please ignore the erratic indentation)

text = "Hello World"

print(text.lower())

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the split() method do in Python?

Joins a list of strings into a single string

Splits a string into a list based on a delimiter

Finds the index of a substring

Replaces a substring with another string

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly removes whitespace from both ends of a string?

text.strip()

text.trim()

text.remove_spaces()

text.split()

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output of the following Python code? (Please ignore the erratic indentation)

word = "Python"

print(word[::-1])

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output of the following Python code? (Please ignore the erratic indentation)

s = "apple,banana,cherry"

print(s.split(","))

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Python expressions will correctly extract "Python" from the string

text = "Learn Python Programming"?

test[6:12]

text.split()[1]

text.find("Python")

text[6:11]

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output of the following code? (Please ignore the erratic indentation)

s = "O-Level Computing"

print(s[-9:])

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?