Module #3 Flashcards

1
Q

A developer issues the Linux command pip3 freeze in an activated Python 3 virtual environment. What is the function that is provided by the command?

  • to output a list of installed Python packages
  • to lock the current virtual environment
  • to prepare the environment before installing a Python package
  • to deactivate the current virtual environment
A

to output a list of installed Python packages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are two characteristics of the Git version control system? (Choose two.)

  • It is a local vcs.
  • It is a centralized VCS.
  • It is a distributed VCS.
  • It is Microsoft proprietary.
  • It is Cisco proprietary.
  • It is open source.
A

It is a distributed VCS.
It is open source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What characteristic describes a formal code review?

  • Code is automatically sent for review by source code management systems once it is checked in.
  • The entire code base is reviewed in a series of meetings.
  • It utilizes a peer code review tool to identify code that needs retesting.
  • It provides direct interaction between the review team and the code author.
A

The entire code base is reviewed in a series of meetings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which fundamental Lean principle forms the basis from which all other Lean principles flow?

  • build integrity in
  • eliminate waste
  • deliver as fast as possible
  • amplify learning
A

eliminate waste

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When a unified diff file is being reviewed, which symbol is used to indicate that a line has been added?

/dev/null
@@
+

A

+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What special characters are used to enclose JSON objects?

forward slash /
square brackets []
curly braces {}
parenthesis ()

A

curly braces {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are two features of the formal code review? (Choose two.)

  • For a quicker turnaround, it involves only one reviewer
  • It involves the developer going through code with the reviewer line-by-line.
  • It promotes discussion among all of the reviewers.
  • It allows the developer to make changes on the spot.
  • It involves a review of the entire code base in a series of meetings.
A
  • It promotes discussion among all of the reviewers.
  • It involves a review of the entire code base in a series of meetings.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which statement describes the Waterfall methodology of software development?

  • Process tasks are broken up into time-boxed iterations called sprints.
  • Each step in the process must be completed before the next step starts
  • It emphasizes elimination of wasted effort and maximizes customer value.
  • Multiple steps in the process are started simultaneously.
A

Each step in the process must be completed before the next step starts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is clean code?

  • code that has no reviewer comments
  • code that has passed functional testing
  • code that is easy to read and understand
  • code that performs a discrete task
A

code that is easy to read and understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the role of the view component in the Model-View-Controller (MVC) flow?

  • It accepts selected data and displays the visual representation to the user.
  • It accepts the input and applies the required rules to format the data.
  • It requests user input and manipulates it to fit the format for the model.
  • It manages the data, logic and rules of the application.
A

It accepts selected data and displays the visual representation to the user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A developer is constructing some functions in Python. When is a function referred to as a module in Python?

  • when the function is declared during the execution of a Python program
  • when the function is initiated during the execution of a Python program
  • when the function is packaged in a single Python file
  • when the function is used for the first time
A

when the function is packaged in a single Python file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A student is learning Python using the interactive interpreter mode. The student issues these commands:

> > > class Uri():
… def_init__(self, host, prot):
… self.host = host
… self.prot = prot
… self.url = self.prot + “://” + self.hostWhich command should the student use to create an object with one attribute being a valid URL?

> > > url2 = Url(URL, ‘http://’, ‘www.cisco.com’)
url2 = Url(‘http’, ‘://’, ‘www.cisco.com’)
url2 = Url(‘www.cisco.com’, ‘http’)
url2 = Url(‘http’, ‘www.cisco.com’)

A

> > > url2 = Url(‘www.cisco.com’, ‘http’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A developer issues a Linux command python3 -m venv devenv . What is the developer trying to achieve?

  • to activate the Python 3 virtual environment named devenv
  • to enter the Python 3 virtual environment named veny using the devnet tool sets
  • to install the devnet tool sets in the Python 3 virtual environment named veny
  • to create a Python 3 virtual environment named devenv
A

to create a Python 3 virtual environment named devenv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does an application use a module in Python?

  • by calling the module name
  • through the include statement
  • by using an assignment statement with a variable
  • through the import statement
A

through the import statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which two programming components are defined as blocks of code that perform tasks when executed? (Choose two.)

functions
methods
parameters
objects
arguments

A

functions
methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which software development methodology prescribes that developers follow a strict process order by completing one step in the SDLC process before proceeding to the next step.

Waterfall
Agile
Lean
Scrum

A

Waterfall

17
Q

A developer wants to find the location of the Python 3 executable file. Which command should the developer use?

locate python3
where python3
which python3
find python3

A

which python3

18
Q

Which SDLC phase concludes with functional code that satisfies customer requirements and is ready to be tested?

maintenance
testing
deployment
implementation

A

implementation

19
Q

Which SDLC development methodology employs many quick iterations known as sprints?

Extreme Programming
Waterfall
Lean
Agile

A

Agile

20
Q

What are the three states of a Git file? (Choose three.)

secured
staged
committed
locked
modified
deleted

A

staged
committed
modified

21
Q

Which code review method involves the developer going through the code line-by-line with the reviewer, allowing the developer to make changes on the spot?

email pass-around
formal
change-based
over-the-shoulder

A

over-the-shoulder

22
Q

Which term is used to describe the first line of an XML document?

preamble
opening
prologue
introduction

A

prologue

23
Q

When a unified .diff file is being reviewed, which symbol is used to indicate that a line has been added?

@@
/dev/null
+
-

A

+

24
Q

What is the role of the controller component in the Model-View-Controller (MVC) flow?

It accepts selected data and displays it to the user.
It provides visual representations and presentations of the data.
It takes user input and manipulates it to the proper format for the model.
It takes in user input and manipulates it to fit the format for the model or view.

A

It takes user input and manipulates it to the proper format for the model.