lastpy

lastpy

Professional Development

15 Qs

quiz-placeholder

Similar activities

Java Strings and lops

Java Strings and lops

Professional Development

10 Qs

Adopt me

Adopt me

KG - Professional Development

14 Qs

NHANH TAY, NHANH MẮT

NHANH TAY, NHANH MẮT

Professional Development

10 Qs

Microsoft 365 for Teachers

Microsoft 365 for Teachers

Professional Development

10 Qs

Introduction to AI - Healthcare & Business

Introduction to AI - Healthcare & Business

University - Professional Development

10 Qs

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Ngobrolin-TI

Ngobrolin-TI

Professional Development

10 Qs

Penilaian Pengetahuan 2 KSK2023

Penilaian Pengetahuan 2 KSK2023

Professional Development

12 Qs

lastpy

lastpy

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

HASAN YIGIT

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code ?

name = "John"

age = 30

greeting = name + age

TypeError

KeyError

IndentationError

ValueError

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code ?

my_list = [1, 2, 3, 4, 5]

index = my_list.index(10)

IndexError

TypeError

ValueError

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code ?

def square(x):

return x * x

result = square()

ValueError

IndexError

TypeError

KeyError

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code ?

user_info = { "name": "Jane", "address": { "street": "123 Main St." } } print(user_info["address"]["city"])

ValueError

IndexError

TypeError

KeyError

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code ?

fruits = ["apple", "banana", "kiwi"]

for i in range(len(fruits) + 1):

print(fruits[i])

IndexError

KeyError

TypeError

ValueError

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fill in the blank

data = {"name": "John", "age": 30, "job": "Software Engineer"}

for key, value in data----:

print(f"{key}: {value}")

.keys()

.items()

.values()

.pairs()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the print statement?

def my_function(n):

result = [i * 2 for i in range(n + 1)]

return result

print(type(my_function(5)))

<class 'range'>

<class 'str'>

<class 'list'>

<class 'int'>

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?