lastpy

lastpy

Professional Development

15 Qs

quiz-placeholder

Similar activities

Q1 PYTHON EXPRESSION

Q1 PYTHON EXPRESSION

Professional Development

20 Qs

Flutter Online Quiz

Flutter Online Quiz

Professional Development

18 Qs

C Code Master lvl 2 A

C Code Master lvl 2 A

Professional Development

10 Qs

Sequences

Sequences

Professional Development

10 Qs

Season 4 #Spaic Python Weekly Quiz

Season 4 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

Java Quiz #1

Java Quiz #1

Professional Development

10 Qs

WCF Training Test II

WCF Training Test II

Professional Development

20 Qs

X-Quiz #4

X-Quiz #4

Professional Development

10 Qs

lastpy

lastpy

Assessment

Quiz

Computers

Professional Development

Hard

Created by

HASAN YIGIT

Used 1+ times

FREE Resource

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'>

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?