lastpy

lastpy

Professional Development

15 Qs

quiz-placeholder

Similar activities

GRAND OPENING INTERNSHIP EXERCISE 2024

GRAND OPENING INTERNSHIP EXERCISE 2024

Professional Development

13 Qs

CORSO G_SUITE parte seconda

CORSO G_SUITE parte seconda

Professional Development

10 Qs

Evaluacion Continua 02 - Enero 2024

Evaluacion Continua 02 - Enero 2024

Professional Development

16 Qs

Révision HTML, CSS et JavaScript

Révision HTML, CSS et JavaScript

Professional Development

20 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

Azure Cloud computing

Azure Cloud computing

Professional Development

10 Qs

Teaching Strategy

Teaching Strategy

Professional Development

20 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

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