
lastpy

Quiz
•
Computers
•
Professional Development
•
Hard
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
Similar Resources on Wayground
12 questions
BFM3002 - QUIZ 2

Quiz
•
University - Professi...
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
10 questions
Python-Quiz-Basic-Datatypes

Quiz
•
12th Grade - Professi...
10 questions
C Programming

Quiz
•
Professional Development
15 questions
Flutter Q_0

Quiz
•
Professional Development
10 questions
Abstract Class #1

Quiz
•
Professional Development
10 questions
Day 3

Quiz
•
Professional Development
20 questions
SPARK FIDDLE

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade