What is the difference between a value and a literal?
A value is data that a program can store or use; a literal is a value written directly in source code, such as 42 or "Ada".
Study 2 Variables, Data Types, and Expressions with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is the difference between a value and a literal?
A value is data that a program can store or use; a literal is a value written directly in source code, such as 42 or "Ada".
What is a variable?
A variable is a name associated with a value, allowing a program to refer to, reuse, or update that information.
What does a data type determine?
A data type identifies what kind of value is represented and which operations are appropriate for it.
Is "42" a string or an integer?
True. The string "42" is text, whereas 42 is an integer.
What values can a Boolean contain?
A Boolean has one of two logical values: True or False. Comparisons commonly produce Boolean results.
What is an expression?
An expression is code that evaluates to a value. It can contain literals, variables, operators, function calls, or nested expressions.
What does 2 + 3 * 4 evaluate to?
14. Multiplication has higher precedence than addition, so 3 * 4 is evaluated before 2 is added.
What is the result of 7 // 2 in Python?
3. In Python, // performs floor division, producing the whole-number quotient for 7 divided by 2.
What is the result of 7 % 2?
1. The remainder operator % gives what remains after integer division: 7 % 2 equals 1.
How do = and == differ in Python?
= assigns a value to a variable; == compares two values for equality and produces a Boolean result.
After count = 10 and count = count + 1, what is count?
11. Python evaluates count + 1 using the current value 10, then assigns the result back to count.
What is type conversion?
Type conversion changes a value from one data type to another, such as converting the text "20" to the integer 20 with int().
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.
Learn how Boolean expressions, logical operators, and conditional structures let programs make reliable decisions, including how to handle boundaries, branch order, and testing.
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.