Test Python

A vibrant and engaging illustration representing Python programming concepts, featuring elements like code snippets, snakes, laptops, and colorful icons symbolizing data structures.

Test Your Python Knowledge

Are you ready to challenge yourself with our Python quiz? This quiz is designed to assess your understanding of Python programming concepts, ranging from basic syntax to more complex data structures. Whether you are a beginner or an experienced coder, there's something here for everyone!

Take the plunge and see how well you really know Python. Topics covered include:

  • Data types and structures
  • File handling
  • Functions and scopes
  • Error handling
10 Questions2 MinutesCreated by CodingMaster2023
Jaki będzie wynik kodu:
 
a = ['on', 'ona', 'ono']
' '.join(a)
'on ona ono'
['on ona ono']
'ononaono'
['ononaono']
Jak dostać się do litery 't' w słowie 'bat'
list = [1, [‘a’, ‘b’, [‘kill’, ‘bat’, ‘cup’], ‘c’], 3]
List[1, 2, 1, 2]
List[2][1][2]
list[1][2][1][2]
list[1][2][1]
Jak otworzyć plik tylko do odczytu?
Open('file.txt', 'r’)
Open('file.txt', w’)
Open('file.txt', 'b’)
Open('file.txt', 'z’)
Jaki będzie wynik kodu:
scores = {‘Ayushi’: 97, ‘Megha’: 98}
 
if scores[‘Ayushi’]>97:
        print(“Scholar”)
elif scores[‘Megha’]>97:
        print(“Topper”)
elif scores[‘Melanie’]>97:
        print(“Teacher”)
else: print(“Nobody topped”)
Teacher
Scholar
Topper
Kod wyrzuci exception: KeyError
Jaki będzie wynik kodu:
 
a=1

def func(a):
    return a**2

a = func(a)**2
print(func(a))

1
2
4
16
Na ile poziomów zagnieżdżają się sublisty w tej liście?
l = list()
l.append([1, 2, [3, 4]])
l.extend([5, 6, 7])
print(l)
1
3
2
4
Jaki będzie wynik kodu:
x = [25, 35, 53, 25, 52, 35, 25]
print(len(x))
25
35
7
5
Który z nich to "assignment operator" w Pythonie?
===
==
=
<<<
Jaki typ danych będzie miała zmienna x po wykonaniu kodu poniżej?
false = “This is not true”
x = false
List
String
Dictionary
Boolean
Który z poniższych jest  "immutable" (wartości nie mogą być zmienione)?
Set
List
Dictionary
Tuple
{"name":"Test Python", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Are you ready to challenge yourself with our Python quiz? This quiz is designed to assess your understanding of Python programming concepts, ranging from basic syntax to more complex data structures. Whether you are a beginner or an experienced coder, there's something here for everyone!Take the plunge and see how well you really know Python. Topics covered include:Data types and structuresFile handlingFunctions and scopesError handling","img":"https:/images/course7.png"}
Powered by: Quiz Maker