Python

A modern design showcasing a Python logo, a computer screen with code, and a quiz theme, bright colors

Master Python with This Fun Quiz!

Test your knowledge of Python programming with our engaging quiz! Whether you're a novice or an experienced developer, this quiz will challenge your understanding and teach you new concepts.

Join now to explore:

  • Case sensitivity in identifiers
  • String formatting techniques
  • Arithmetic operators with strings
  • List operations and functions
10 Questions2 MinutesCreated by CodingArtist301
1. Is Python case sensitive when dealing with identifiers?
A) yes
B) no
C) machine dependent
D) none of the mentioned
2. What is the output of the code shown : l=list('HELLO') 'first={0[0]}, third={0[2]}'.format(l)
A) ‘first=H, third=L’
B) ‘first=0, third=2’
C) Error
D) ‘first=0, third=L’
3. Fill in the blanks: The formatting method {1:<10} represents the ___________ positional argument, _________ justified in a 10 character wide field.
A) first, right
B) second, left
C) first, left
D) second, right
4. What is the output of the following? print('ab cd ef'.title())
A) Ab cd ef
B) Ab cd eF
C) Ab Cd Ef
D) None of the mentioned
5. What arithmetic operators cannot be used with strings ?
A) +
B) *
C) –
D) All of the mentioned
6. Which of the following commands will create a list?
A) list1 = list()
B) list1 = [].
C) list1 = list([1, 2, 3])
D) all of the mentioned
7. To shuffle the list(say list1) what function do we use ?
A) list1.shuffle()
B) shuffle(list1)
C) random.shuffle(list1)
d) random.shuffleList(list1)
8. What is the output when following statement is executed ? >>> print(‘x\97\x98’)
A) Error
B) 97 98
C) x\97
D) \x97\x98
9. What is the output of the following? print('ab'.zfill(5))
A) 000ab
b) 00ab0
C) 0ab00
D) ab000
10. Which of the following cannot be a variable?
a) __init__
B) in
C) it
D) on
{"name":"Python", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Python programming with our engaging quiz! Whether you're a novice or an experienced developer, this quiz will challenge your understanding and teach you new concepts.Join now to explore:Case sensitivity in identifiersString formatting techniquesArithmetic operators with stringsList operations and functions","img":"https:/images/course8.png"}
Powered by: Quiz Maker