stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Bakhit,Junier AP exam review Flashcards | StudBud
Explore
/
Bakhit,Junier AP exam review
Bakhit,Junier AP exam review
100 terms
·
StudBud Administration
Imported from external platform
Flashcards
100 cards
F
Practice quiz
P
Host live
L
Questions
100
Answers
1
In networking, what is the purpose of NAT (Network Address Translation)?
To encrypt data transmission over the internet
c) To translate private IP addresses to public IP addresses
b) To prevent unauthorized access to a network
a) To manage files and directories in an operating system
2
What is the function of a compiler?
c) To translate natural language into programming language
a) To execute instructions one at a time
b) To convert source code into machine code
d) To manage files and directories i
3
Which of the following is NOT an example of artificial intelligence (AI)?
d) Computer vision
a) Machine learning
c) Sorting algorithms
b) Natural language processing
4
Answer
Nothing
Nothing
Apple
Nothing
5
Which of the following operators is used for exponentiation in Python?
%
**
//
^
6
In Python, what symbol is used to denote comments?
//
#
/
<!--
7
What is the purpose of a loop in programming?
d) To declare variables with specific data types
b) To make decisions based on conditions
c) To repeat a block of code multiple times
a) To execute a block of code only once
8
Which of the following is an example of social engineering in cybersecurity?
d) Updating software regularly
a) Installing antivirus software
c) Phishing attacks
b) Using strong passwords
9
WHat is the output
b) [1, 2, 3, 4]
c) [4, 3, 2, 1]
a) [1, 2, 3]
[1, 2, 4, 3]
10
What does the "import random" statement do in Python?
b) Imports the math module, allowing access to mathematical functions
a) Imports the random module, allowing access to random number in functions
imports the os module,allowing access to operating system-related functions
c) Imports the time module, allowing access to time-related functions
11
What does the "append()" method do in Python lists?
b) Adds an element to the beginning of the list
Reverses the elements of the list
a) Removes the last element of the list
c) Adds an element to the end of the list
12
What is the primary purpose of data validation in web forms?
d) To manage files and directories in an operating system
a) To prevent unauthorized access to data
c) To enhance network security and prevent cyber attacks
b) To ensure data is accurate and formatted correctly
13
WHat is the output
2.0
3
2.5
2
14
What is the purpose of the "break" statement in Python?
a) To create a loop
c) To continue to the next iteration of a loop
b) To exit a loop
To define a condition
15
What does HTML stand for in web development?
a) Hyper Text Markup Language
b) High-level Text Manipulation Language
d) Home Tool Markup Language
c) Hypertext Transfer Protocol
16
What does the "len()" function do in Python?
b) Returns the largest element in a list
Returns the sum of elements in a list
c) Returns the smallest element in a list
a) Returns the length of a list
17
What does the "strip()" method do in Python?
c) Returns the index of the first occurrence of a substring
Converts a string to lowercase
a) Removes leading and trailing whitespace from a string
b) Splits a string into a list of substrings
18
What is the result of the following Python code?
b) Hello World
a) HelloWorld
c) Hello + World
ERROR
19
What does the "return" keyword do in Python?
a) Terminates the program
b) Returns a value from a function
c) Raises an exception
Deletes a variable
20
Which of the following is NOT a valid HTML tag?
b) <div>
a) <p>
<span>
c) <function>
21
What is the role of a public key in asymmetric encryption?
d) To verify the authenticity of a message
c) To create a digital signature
a) To encrypt data
b) To decrypt data
22
How do if statements work in programming?
c) They are used to define functions in a program
a) They are used to repeat a block of code a specific number of times
d) They are used to declare variables with specific data types
b) They are used to make decisions based on conditions
23
What does the "append()" method do in Python?
b) Adds an element to the end of a list
c) Removes the first occurrence of a value from a list
Converts a list into a string
a) Sorts a list in ascending order
24
Which of the following is a valid way to declare a list in Python?
c) list = {1, 2, 3}
list = {1: 'one', 2: 'two', 3: 'three'}
a) list = [1, 2, 3]
b) list = (1, 2, 3)
25
What is the output?
[2]
b) [2, 3]
c) [1, 3]
a) [1, 2]
26
What is the primary objective of data validation in database management?
d) To improve network performance
c) To store data in an encrypted format
a) To prevent unauthorized access to data
b) To ensure data is accurate, consistent, and usable
27
What is the significance of a 404 error in web development?
a) It indicates a successful server request
d) It manages data stored in databases
c) It encrypts data transmission over the internet
b) It indicates that the requested resource was not found
28
What is the purpose of the "try-except" statement in Python?
To import modules
b) To define a function
a) To define a loop
c) To handle exceptions
29
What does the "import" keyword do in Python?
a) Exports a module from a file
deletes a modual from memory
renames a module
imports a mondule from the file
30
Which of the following is the correct way to declare a variable in Python?
var 10 = variable
b) 10 = variable
c) variable: 10
a) variable = 10
31
What is the purpose of the "else" keyword in Python?
c) It is used to define the else block in a try-except statement
a) It is used to handle exceptions
b) It is used to define the finally block
It is used to define the else block in a loop
32
What does the "join()" method do in Python?
Finds the index of a substring in a string
b) Removes elements from a list based on a condition
a) Combines elements of a list into a single string
c) Converts a string to a list of characters
33
What is the output of the following Python code?
0 1 2 3
ERROR: Missing indentions
0 1 2
1 2 3
34
What is the purpose of an array in programming?
c) To execute a block of code only once
b) To declare variables with specific data types
a) To store multiple values of the same type in a single variable
d) To create graphical user interfaces
35
What is the output of the following Python code?
ERROR: undefined variable x
1
0
3.5
36
What is the output?
b) x is less than y
a) x is greater than y
c) x is less than or equal to y
x is greater than or equal to y
37
In machine learning, what is the role of labeled data in supervised learning?
b) It is used to make predictions on new, unseen data
a) It is used to train a model without human intervention
c) It provides input features without corresponding output labels
d) It is used to train a model by providing input-output pairs
38
What is the purpose of an API (Application Programming Interface)?
d) To store and manage data on remote servers
c) To manage files and directories in an operating system
a) To design graphical user interfaces
b) To interact with and access the functionality of software components
39
What does the "input()" function do in Python?
Generates a random number
a) Prints output to the console
b) Reads user input from the console
c) Converts a string to uppercase
40
Which of the following is a valid Python comparison operator?
++
b) +=
=
c) ==
41
What is the purpose of data normalization in database management?
b) To store data in an encrypted format
c) To ensure data is organized efficiently and free from redundancy
a) To prevent unauthorized access to data
d) To improve network performance
42
Which of the following best describes the concept of abstraction in computing?
a) Focusing on minute details of a problem
c) Building physical models of computer systems
b) Hiding complex details and showing only essential features
Emphasizing theoretical concepts over practical applications
43
What is the role of a primary key in a relational database?
d) To enhance network security and prevent cyber attacks
c) To create secure connections between devices
a) To ensure data is accurate, consistent, and usable
b) To uniquely identify each record in a table
44
What is the primary role of an operating system?
c) To store and retrieve data from memory
a) To design web pages and user interfaces
b) To manage hardware resources and provide a user interface
d) To connect multiple networks and forward data packets
45
Which of the following data types is mutable in Python?
set
String
List
Tuple
46
What does the "split()" method do in Python?
What is the output of the following code snippet?
b) Splits a string into a list of substrings
c) Removes leading and trailing whitespace from a string
a) Combines two strings into one
47
It is used to define the else block in a loop
b) dict = [1, 2, 3]
a) dict = {1: 'one', 2: 'two', 3: 'three'}
dict = "one", "two", "three"
c) dict = (1, 2, 3)
48
Which of the following is NOT a characteristic of a relational database?
d) Ensures data integrity through constraints
a) Stores data in tables with rows and columns
b) Supports SQL for data manipulation
Does not require data normalization
49
What does the "del" keyword do in Python?
Deletes a function from a module
b) Deletes a variable or element from memory
c) Deletes a comment from the code
a) Deletes a file from the filesystem
50
What is the role of an algorithm in computer science?
d) To create graphical user interfaces
c) To solve problems by providing a step-by-step procedure
b) To control the flow of execution in a program
a) To store data in memory
51
Which of the following statements correctly defines a function in Python?
c) myFunction():
define myFunction():
a) function myFunction():
b) def myFunction():
52
What does the "len()" function return in Python?
b) The length of a string or list
The logarithm of a number
c) The square root of a number
a) The largest integer less than or equal to a number
53
What does the "else" keyword do in a "try...except" block in Python?
a) It is used to handle exceptions
b) It is used to define the finally block
c) It is used to define the else block
It is used to raise an exception if an error occurs
54
What data type is used to store a sequence of characters in Python?
Float
String
Integer
Boolean
55
What is the function of the CSS property "margin"?
b) To define the background color of an element
To manage hardware resources and provide a user interface
c) To create secure connections between devices
a) To specify the space between elements' content and border
56
Which of the following is NOT a valid way to open a file in Python?
open("file.txt", "a")
a) open("file.txt", "r")
b) open("file.txt", "w")
c) open("file.txt", "execute")
57
What is the purpose of the "AP Computer Science Principles" course?
c) To focus solely on hardware engineering
b) To introduce students to the foundational concepts of computing
To explore the history of computer science
a) To teach advanced programming languages
58
What does the "strip()" method do in Python?
c) Returns the index of the first occurrence of a substring
concerts a string to lowercase
a) Removes leading and trailing whitespace from a string
b) Splits a string into a list of substrings
59
What is the role of a function in programming?
a) To execute a block of code only once
To declare variables with specific data types
b) To repeat a block of code multiple times
c) To encapsulate a block of code for reuse
60
What is the primary role of a cookie in web development?
d) To request resources such as web pages and images from a server
b) To manage hardware resources and provide a user interface
c) To store user data on the client-side
a) To create secure connections between devices
61
What is the significance of DNS (Domain Name System) in networking?
c) It manages data stored in databases
d) It creates secure connections between devices
a) It encrypts data transmission over the internet
b) It translates domain names into IP addresses
62
What is the purpose of a for loop in programming?
To interact with and manipulate data in databases
a) To execute a block of code only once
c) To make decisions based on conditions
b) To repeat a block of code a specific number of times
63
Answer
Hel
ello
llo
lo
64
In Python, how do you indicate the end of a block of code within an if statement or loop?
c) By using curly braces {}
By typing "end"
b) By indenting the code
a) By adding a semicolon (;)
65
Which of the following is NOT a valid CSS property?
a) font-size
d) margin
b) background-color
c) loop-count
66
What is the purpose of an else statement in programming?
To declare variables with specific data types
c) To provide an alternative block of code if a condition is not met
a) To execute a block of code only once
b) To repeat a block of code multiple times
67
What does the "input()" function do in Python?
c) Reads user input from the console
a) Generates a random number
b) Prints output to the console
Converts a string to uppercase
68
What is the output of the following Python code?
Error: Missing indentation
b) Hello, Alice!
a) Hello, name!
c) Hello, !
69
In machine learning, what is the purpose of feature extraction?
a) To train a model without human intervention
c) To select and transform relevant input variables
b) To evaluate the performance of a model
d) To make predictions on new, unseen data
70
What is the result of the following Python code?
Error: Cannot modify elements of a list
c) [1, 4, 3]
b) [4, 2, 3]
a) [1, 2, 3, 4]
71
What is the purpose of data visualization in data analysis?
b) To store and retrieve data from memory
a) To hide complex details and show only essential features
d) To enhance network security and prevent cyber attacks
c) To communicate insights and trends effectively
72
What is the result of 3 ** 2?
5
9
11
6
73
What is the purpose of iteration in programming?
c) To create graphical user interfaces
a) To define the structure of a program
b) To execute a block of code repeatedly
d) To store and retrieve data from memory
74
What is the function of a switch statement in programming?
b) To execute a block of code repeatedly
d) To store and retrieve data from memory
c) To make decisions based on multiple conditions
a) To create secure connections between devices
75
Which of the following is a valid way to comment a single line in Python?
c) # This is a comment
b) /* This is a comment */
<!-- This is a comment -->
a) // This is a comment
76
In cybersecurity, what is the purpose of multi-factor authentication (MFA)?
a) To encrypt data transmission over the internet
b) To provide a secure connection over the internet
d) To manage files and directories in an operating system
c) To enhance network security by requiring multiple forms of verification
77
What is the purpose of the "range()" function in Python?
To repeat a block of code a specific number of times
c) To check if a number is within a range
a) To generate a list of numbers
b) To generate a random number
78
In cybersecurity, what is the purpose of a VPN (Virtual Private Network)?
b) To enhance network speed
a) To block unwanted emails
d) To improve website performance
c) To provide a secure connection over the internet
79
What is the primary objective of data mining in business intelligence?
c) To extract useful patterns and insights from large datasets
a) To prevent unauthorized access to data
b) To improve network performance
d) To manage files and directories in an operating system
80
What is the difference between symmetric and asymmetric encryption?
Asymmetric encryp. is used only for secure communication over the internet
Symmetric encryption uses two different keys: asymmetric uses only one key
b) Symmetric encryption is slower than asymmetric encryption
Symmetric encry uses the same for both encry and decry. , while asymmetric
81
Which of the following is NOT a valid programming paradigm?
b) Functional programming
a) Object-oriented programming (OOP)
c) Imperative programming
d) Network programming
82
What is the role of SQL in database management?
a) To create dynamic web pages
c) To interact with and manipulate data in databases
b) To design graphical user interfaces
d) To control the flow of execution in a program
83
What is the output of the following Python code?
c) ale
a) app
Error: Missing quotation marks
b) ppl
84
What is the purpose of a firewall in network security?
d) To create secure connections between devices
a) To prevent unauthorized access to a network
b) To enhance the speed of data transmission
c) To store and manage data on remote servers
85
What is the correct syntax for a for loop in Python?
for i in range (5):
b) for i = 0; i < 5; i++
for i = 0 to 5
a) for i in range(5)
86
What is the function of a router in a computer network?
c) To store and retrieve data from memory
b) To connect multiple networks and forward data packets
d) To encrypt data transmission over the internet
a) To manage files and directories
87
What is the output of the following Python code?
7
10
32
25
88
Which of the following best describes cloud computing?
b) A method of storing and accessing data over the internet
c) A technique for compressing files to reduce storage space
d) A programming language for building web applications
a) A type of encryption used for securing data transmission
89
What is the purpose of the "continue" statement in Python?
c) To execute a block of code repeatedly
b) To skip the remaining code in a loop and jump to the next iteration
To declare a variable
a) To exit a loop
90
What is Python primarily used for?
ALL of the above
c) Robotics
b) Data analysis
a) Web development
91
What is the result of the following Python code?
b) x is less than or equal to 5
a) x is greater than 5
x is less than 5 x is less than 5
c) x is greater than or equal to 5
92
Which of the following is a valid relational operator in programming?
c) **
d) //
a) &&
b) ++
93
What is the purpose of an HTTP (Hypertext Transfer Protocol) request in web development?
a) To design graphical user interfaces
b) To store and manage data on remote servers
c) To request resources such as web pages and images from a server
d) To encrypt data transmission over the internet
94
What i the output
x is less than 5
x is greater than or equal to 5
a) x is greater than 5
x is less than or equal to 5
95
Which of the following is NOT a valid data type in most programming languages?
a) Integer
a) Integer
c) Float
d) loop
96
What is the purpose of a file system in an operating system?
To organize and store files on storage devices
b) To interact with and manipulate data in databases
d) To encrypt data transmission over the internet
a) To manage hardware components
97
What is the primary objective of data sovereignty?
d) To improve data accessibility
c) To ensure data is subject to the laws of a specific jurisdiction
a) To prevent data loss and corruption
b) To ensure data is stored securely in a centralized location
98
Which of the following is an example of a high-level programming language?
b) Assembly language
a) Machine ode
Binary code
c) Java
99
What is the primary purpose of an object in object-oriented programming (OOP)?
To make decisions based on conditions
b) To encapsulate data and behavior into a single entity
c) To execute a block of code repeatedly
a) To create secure connections between devices
100
What does the "range()" function do in Python?
Raises a number to a power
a) Generates a sequence of numbers
c) Reverses the order of elements in a list
b) Returns the remainder of a division operation