What is a variable?
A variable is a name associated with a value so a program can use that value later.
Study 02 Variables, Expressions, and Input/Output with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a variable?
A variable is a name associated with a value so a program can use that value later.
What does assignment do?
Assignment evaluates the expression on the right and associates its resulting value with the target name. In Python, assignment uses =.
What is a value?
A value is a piece of data, such as a number, character sequence, or Boolean value.
What is a Python constant?
A constant is a value a program intends not to change. Python conventionally uses uppercase names, but does not enforce constancy.
What is a literal?
A literal is a value written directly in source code, such as 42, 3.14, "hello", True, or None.
What is an expression?
An expression is code that produces a value. Examples include 7, price, and price * quantity.
What does += combine?
Augmented assignment combines an operation with assignment; for example, count += 2 has the effect of count = count + 2.
How do = and == differ?
The == operator tests equality and produces a Boolean result, whereas = assigns a value and changes program state.
Why use parentheses in expressions?
Parentheses are evaluated first, followed by exponentiation, multiplication or division, addition or subtraction, comparisons, and logical operators.
What is program state?
Program state is the complete set of values that matter at a particular moment during execution. Assignments change that state.
What type does input() return?
Python's input() reads a line from standard input and returns it as a string, even when the user enters digits.
How do you convert numeric input?
Convert text with int() for integers or float() for floating-point numbers when arithmetic is needed; conversion can fail for invalid input.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A practical guide to integrating problem definition, data representation, modular programming, algorithms, complexity analysis, testing, correctness, and ethical evaluation into a responsible computer science capstone.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.