stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
BASIC PROGRAMMING CONCEPTS Flashcards | StudBud
Explore
/
BASIC PROGRAMMING CONCEPTS
6. What is an algorithm?
17. What does if-else control structure do?
BASIC PROGRAMMING CONCEPTS
25 terms
·
StudBud Administration
·
23 plays
Imported from external platform
Flashcards
25 cards
F
Practice quiz
P
Host live
L
Questions
25
Answers
1
17. What does if-else control structure do?
C) Defines a variable
D) Performs mathematical operations
B) Chooses between two actions
A) Repeats a block of code
2
6. What is an algorithm?
C) A type of control structure
A) A sequence of musical notes
B) A step-by-step set of instructions to solve a problem
D) A data storage method
3
7. In an algorithm, which of the following is a decision point?
D) Arrow
A) Rectangle
B) Oval
C) Diamond
4
15. What is the keyword used in Python to define a function?
C) def
B) define
A) func
D) function
5
25. What is the main characteristic of an interpreted language?
B) It is executed line-by-line by an interpreter
D) It does not need an interpreter or compiler
A) The entire program is converted to machine code before execution
C) It is written in binary code
6
20. What is the purpose of a for loop?
C) To call a function
B) To execute code conditionally
D) To store values
A) To repeat code for a fixed number of times
7
18. Which programming language uses binary directly to communicate with the CPU?
A) Assembly
B) Java
D) Python
C) Machine language
8
8. What shape represents the start or end in a flowchart?
B) Rectangle
C) Oval
D) Arrow
A) Diamond
9
13. Which of the following is an interpreted language?
C) Python
B) Java
D) Assembly
A) C++
10
16. What is a flowchart used for?
D) Testing code
B) Representing an algorithm visually
A) Writing code
C) Storing data
11
2. Which of the following is a string data type?
C) 3.14
B) "Hello World"
A) 42
D) True
12
23. What does a compiler generate?
C) Pseudocode
B) Machine code or executable file
D) Error messages
A) Assembly code
13
14. Which data type is best for storing the value 3.14?
B) Integer
D) Boolean
C) Float
A) String
14
1. What is a variable in programming?
A) A container for storing data values
D) A function call
B) A mathematical operation
C) A type of loop
15
11. What is the output of the following Python code: print(2 + 3)?
B) 2 + 3
D) 6
C) 5
A) 23
16
10. What does a compiler do?
D) Converts machine code to high-level code
C) Translates code line-by-line
B) Translates assembly code to machine code
A) Translates high-level code to machine code all at once
17
3. What is the purpose of control structures in programming?
A) To store data
D) To create variables
C) To represent mathematical formulas
B) To control the flow of a program
18
4. Which of the following is an example of a loop?
D) Break
C) Switch-case
B) While
A) If-else
19
24. Which of these languages is typically compiled?
B) Java
C) HTML
A) Python
D) C++
20
22. In a flowchart, what does a rectangle represent?
D) Start or end
B) A process or action
A) A decision
C) Input/output
21
21. Which of the following is not a control structure?
C) For
A) If-else
D) Variable
A) If-else
22
9. Which programming language is low-level?
A) Python
D) C++
C) Java
B) Assembly
23
19. What is a high-level language?
A) A language with more control over hardware
B) A language closer to machine code
D) A language used only for web development
C) A language with English-like syntax
24
12. What does an assembler do?
B) Converts assembly language to machine code
C) Executes high-level code
D) Translates code line-by-line
A) Converts machine code to assembly
25
5. What is a function in programming?
C) A data type
A) A reusable block of code that performs a task
B) A type of variable
D) A conditional statement