stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python for Cybersecurity Review Flashcards | StudBud
Explore
/
Python for Cybersecurity Review
Python for Cybersecurity Review
10 terms
·
StudBud Administration
·
55 plays
>just the review slideshow questions in Quiz format
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
What will happen when you run the following code?
The file will be overwritten with "Hello World"
An error will occur because "w" allows reading the file
An error will NOT occur because an exception was NOT added
"Hello World" will be appended to the file
2
When creating client-server communication scripts, which one should be executed first?
The server
The client
It does not matter
Both must be executed at the same time
3
What will happen when the following code is executed?
It will display an indentation error.
It will not run because if was not invoked.
It will print Hello.
It will not run because it cannot understand True.
4
Read and answer the following question:
The code is erroneous
X cannot be variable
10
20
5
Read and answer the question pictured below:
The command global x
The command self x
The command main x
The command pass x
6
What will be the output of the following code?
2
0
3
10
7
Which of the following should be used to iterate over a list and print its items separately?
While loop
For loop
If condition
Dictionary
8
Read and answer the question pictured below:
To check if the file is imported or directly executed
To check the name of the file
To check if the file is the main file in the project
To ensure the first function in the file is executed
9
When sending text via the socket library to a server, why should the text be encoded?
The data must be encoded with SHA
The data must be encoded to ASCII
Because it is code
It must be passed as a byte object
10
A code is read from left to right & top to bottom while checking & executing each line in the process. What's going on?
Compilation
Interpretation
Encapsulation
Debugging