WARM UP EXERCISE

A vibrant illustration of a computer screen displaying Python code, with colorful graphics representing coding concepts and a quiz format

Python Programming Quiz

Test your knowledge of Python with this engaging quiz! Whether you're a beginner or have some experience, this quiz will challenge your understanding of key concepts in Python programming.

  • 6 thought-provoking questions
  • Multiple choice format
  • Instant feedback on answers
6 Questions2 MinutesCreated by CodingWizard325
Name:
>>> l=[23,56,90,56]
>>> x=[i for I in l if i>50]
>>> x
[56,90]
[56, 90, 56]
[56]
[90,56,56]
 
>>> s="illumination"
>>> s.count('i')
3
2
4
5
s="illumination"
s[-1:-8:-2]
Noi
Niai
Aini
Iani
def f():
    x = 42
    def g():

           x = 43
    print("Before calling g: " + str(x))
    print("Calling g now:")
    g()
    print("After calling g: " + str(x))

x = 3
f()
print("x in main: " + str(x))
Before calling g: 42 Calling g now: After calling g: 42 x in main: 3
Before calling g: 42 Calling g now: After calling g: 43 x in main: 3
Before calling g: 42 Calling g now: After calling g: 42 x in main: 43
Before calling g: 3 Calling g now: After calling g: 42 x in main: 3
l=[]
def convert(b):
      if(b==0):
           return l
      dig=b%2
      l.append(dig)
      convert(b//2)

convert(10)
l.reverse()
for I in l:
     print(i,end="")
110
1010
1000
1001
{"name":"WARM UP EXERCISE", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Python with this engaging quiz! Whether you're a beginner or have some experience, this quiz will challenge your understanding of key concepts in Python programming.6 thought-provoking questionsMultiple choice formatInstant feedback on answers","img":"https:/images/course8.png"}
Powered by: Quiz Maker