for_students

for_students

11th Grade

20 Qs

quiz-placeholder

Similar activities

soal semester kelas 9

soal semester kelas 9

9th - 12th Grade

15 Qs

Penilaian Tenah Semester

Penilaian Tenah Semester

11th Grade

20 Qs

RIAN OCTAVIANTI

RIAN OCTAVIANTI

9th - 12th Grade

20 Qs

Metode Berpikir Komputasional

Metode Berpikir Komputasional

9th - 12th Grade

20 Qs

Tổng kết CLB Minecraft Education

Tổng kết CLB Minecraft Education

1st Grade - University

20 Qs

Quiz về Kiểu Dữ Liệu List và Set (1)

Quiz về Kiểu Dữ Liệu List và Set (1)

7th Grade - University

15 Qs

ICT Quiz 1

ICT Quiz 1

9th - 12th Grade

20 Qs

STS Informatika Kelas  8 Semester 1

STS Informatika Kelas 8 Semester 1

8th Grade - University

20 Qs

for_students

for_students

Assessment

Quiz

Information Technology (IT)

11th Grade

Practice Problem

Medium

Created by

nuris nurus

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def palindrome(s):

return s == s[::-1]

print(palindrome("level"))

print(palindrome("world"))

True, True

True, False

False, True

False, False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def find_max(lst):

if not lst:

return None

max_value = lst[0]

for num in lst:

if num > max_value:

max_value = num

return max_value

print(find_max([3, 1, 4, 2, 5]))

print(find_max([]))

  • 5, None

3, Error

4, 0

None, None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def countdown(n):

if n <= 0:

return []

return [n] + countdown(n - 1)

print(countdown(3))

[3, 2, 1]

[3, 2, 1, 0]

[0, 1, 2, 3]

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def reverse_list(lst):

return lst[::-1]

print(reverse_list([1, 2, 3, 4, 5]))

[1, 2, 3, 4, 5]

error

[5, 4, 3, 2, 1]

[5, 3, 1]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def square_numbers(lst):

return [x**2 for x in lst if x % 2 != 0]

print(square_odd_numbers([1, 2, 3, 4, 5]))

[1, 4, 9, 16, 25]

Error

[2, 4]

[1, 9, 25]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def factorial(n):

if n < 0:

return "Undefined"

if n == 0 or n == 1:

return 1

return n * factorial(n - 1)

print(factorial(5))

print(factorial(-1))

120, Error

120, Undefined

1, Undefined

0, Undefined

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def square(n):

return n * n

def process_list(lst):

return [square(x) for x in lst]

print(process_list([1, 2, 3, 4]))

[1, 2, 3, 4]

[1, 4, 9, 16]

[1, 8, 9, 16]

Error

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?