Introduction To Coding Flashcards
7 cards from real Amazon practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Introduction To Coding flashcards as text
What does an 'if' statement do?
Answer: Executes code only when a condition is true
Conditional statements run a block of code only when a given condition evaluates to true.
Which of these is an example of a string?
Answer: "Amazon"
A string is a sequence of characters, usually wrapped in quotation marks.
What is the result of the operation 7 % 2 (modulo) in most languages?
Answer: 1
The modulo operator returns the remainder of division, and 7 divided by 2 leaves a remainder of 1.
What is the purpose of a comment in code?
Answer: To explain code to humans without affecting execution
Comments are notes ignored by the computer that help developers understand the code.
Which keyword is commonly used to define a loop that runs a known number of times?
Answer: for
A 'for' loop is typically used when the number of iterations is known in advance.
What does 'syntax' refer to in programming?
Answer: The set of rules for how code must be written
Syntax defines the correct structure and grammar a programming language requires.
What is an algorithm?
Answer: A step-by-step set of instructions to solve a problem
An algorithm is a defined sequence of steps used to accomplish a task or solve a problem.