This topic covers the core Python programming concepts prescribed for the C20 DCME Fifth Semester Board Examination — variables, operators, control flow, data structures, functions, OOP, and exception handling. It maps d...
A variable in Python is a name that refers to a value in memory; no explicit type declaration is needed.
Python uses dynamic typing, so the same name can later refer to a value of a different type.
Declaration and initialization in Python usually happen together in a single assignment statement.
~15 min · full explanation, examples & memory tricks in the app
❓ Leveled MCQ practice
Try the smart MCQs from this kit
18 questions laddered from warm-up to topper-level, each with an explanation. A taste:
In Python, what is a variable?
Beginner
A A fixed box that stores only integersB A reserved keyword for declaring typesC A name that refers to a value in memoryD A function that prints values
Show answer & explanation
A name that refers to a value in memory
A Python variable is a name bound to a value in memory. No type declaration is required, and the name can later refer to a value of a different type.
Which statement about Python's typing is correct?
Beginner
A A name can never refer to a different type laterB Every variable must be declared with a type firstC Types are decided by the file extensionD Types are determined at runtime, not declared in advance
Show answer & explanation
Types are determined at runtime, not declared in advance
Python uses dynamic typing: the type of a value is determined at runtime, so the same name can later refer to a value of a different type.
A student writes `x = 10` and then `x = "hello"` in the same program. What happens?
Beginner
A It raises a type error immediatelyB `x` keeps the integer 10 and ignores the stringC Python deletes `x` and creates a new variableD It runs fine; `x` now refers to a string
Show answer & explanation
It runs fine; `x` now refers to a string
Because of dynamic typing, reassigning `x` to a string is perfectly legal. The name simply points to a new value.
Which operator assigns a value rather than comparing two values?
Beginner
A `=`B `!=`C `is`D `==`
Show answer & explanation
`=`
`=` is the assignment operator. `==` compares two values for equality, and `!=` and `is` are also comparison-style operators.
🃏 Flashcards
Tap a card to flip it
35 flashcards in this kit — the app reviews them with
spaced repetition so the right card returns on the right day.
🎮 Learning games
Play your way through this kit
Every game is built from this kit's own content — scores feed your
mastery, so playing counts as studying.
Word Match True False Memory Match Flashcard Battle Speed Quiz Guess Term Sequence Builder Categorization Revision Battle Playable in the app
The full Veda Bites deck, complete notes, spaced-repetition
flashcards, leveled MCQs, tests and games for this kit — plus
Daily Facts and the Arena, every day.