What is the difference between syntax and semantics?
Syntax is the set of rules for writing valid code; semantics is what correctly written code means when it runs.
Study 3 Programming Fundamentals with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is the difference between syntax and semantics?
Syntax is the set of rules for writing valid code; semantics is what correctly written code means when it runs.
What is a variable?
A variable is a name associated with a value. Assignment creates or changes that association.
Which operator tests equality in Python?
Use `==` to test equality. A single `=` assigns a value to a name.
Name five basic Python data values or types.
An integer is a whole number; a float has a fractional part; a string is text; a Boolean is `True` or `False`; `None` represents absence of a value.
How does Python conventionally represent a constant?
A constant is a value intended not to change during execution. Python commonly signals this intention with uppercase names, but does not enforce it.
What is an expression?
An expression is code that produces or computes a value; it can contain literals, variables, operators, and function calls.
What is a statement?
A statement is an instruction that performs an action, such as assigning a value, displaying output, importing a module, or controlling execution.
What does indentation organize in Python?
Python uses indentation to show which statements belong to a compound-statement block, such as an `if`, `for`, or `while` block.
What type does `input()` return?
`input()` returns the user’s response as a string, even when the response represents a number.
What does `print()` do?
`print()` writes values to standard output. Multiple arguments are separated by spaces by default.
How does a Python comment work?
A comment begins with `#` and is intended for human readers; Python normally ignores it during execution.
What distinguishes a docstring from a `#` comment?
A docstring is a string associated with a function, class, or module for documentation; it is not the same as a regular `#` comment.
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
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 focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.
A medium-difficulty quiz on integrating problem definition, representation, algorithms, complexity analysis, testing, correctness, ethical evaluation, and documentation in a computer science capstone.
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.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.