Devasc 3-4 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?

A. to prepare the environment before installing a Python package
B. to output a list of installed Python packages
C. to deactivate the current virtual environment
D. to lock the current virtual environment

A

B

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

*What is clean code?

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

A

D

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

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

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

A

B

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

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

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

B,C

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?

A. –
B. /dev/null
C. @@
D. +
A

D

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

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

A. build integrity in
B. deliver as fast as possible
C. eliminate waste
D. amplify learning

A

C.

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

Which statement describes the Waterfall methodology of software development?

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

A

A

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

What special characters are used to enclose JSON objects?

A. square brackets []
B. curly braces {}
C. forward slash /
D. parenthesis ()

A

B

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

What characteristic describes a formal code review?

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

A

C

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?

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

A

C

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

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

A. It involves the developer going through code with the reviewer line-by-line.
B. It promotes discussion among all of the reviewers.
C. It involves a review of the entire code base in a series of meetings.
D. It allows the developer to make changes on the spot.
E. For a quicker turnaround, it involves only one reviewer.

A

B,C

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

In which situation would a synchronous API be used?

A. when the client is not required to take action
B. when the original API request or data from the request is delayed
C. when data is being retrieved from a database
D. when a server is not part of the process

A

C

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

Which API architectural style uses an XML-based messaging protocol to communicate between applications?

A. SOAP
B. XML-RPC
C. REST
D. NFS

A

A

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

Which SOAP message root element defines the XML document as a SOAP message?

A. Header
B. Meta tag
C. Body
D. Envelope

A

D

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

What is the meaning of the term flow as it relates to the OAuth 2.0 authorization framework?

A. It is the number of requests contained in the token bucket.
B. It is the sequence of data exchanged between a REST API request and a response.
C. It is a process for an API request to send authentication credentials to a web service.
D. It is a process for an API user to obtain an access token from the authorization server.

A

D

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

A network engineer is learning about Rest APIs. When executing a particular API, the server responds with curl. How is this information useful?

A. Curl shows the URL used in the API request.
B. Curl shows how to access the content displayed in the response body using curl.
C. Curl shows the information the API returned from the server.
D. Curl shows the retrieved information in JSON format.

A

B

17
Q

A client is sending a REST API request to a web server. The request includes the need for data compression. Which three values are acceptable for the Accept-Encoding request header? (Choose three.)

A. xz
B. zip
C. br
D. *
E. gzip
F. tar
A

C,D,E

18
Q

Which characteristic of the SOAP architecture specifies communication between all similar and dissimilar application types?

A. interface uniformity
B. neutrality
C. independence
E. extensibility

A

C

19
Q

What is an architectural constraint to which a true RESTful API web service must adhere?

A. It uses HTTPS to transport data.
B. It operates in a stateless way.
C. It operates as a cloud service.
D. It must operate along with a DNS server.

A

B

20
Q

What is a characteristic of a RESTful API?

A. It supports a secure data transmission between a remote user and an enterprise network.
B. It uses HTTP methods to gather and manipulate data.
C. It facilitates the configuration changes from a network controller to end devices.
D. It is a southbound API.

A

B

21
Q

What are two purposes for using rate limits on public and unrestricted APIs? (Choose two.)

A. to avoid a server overloading from too many requests at the same time
B. to limit the number of authorization requests per API call
C. to limit the number of passwords that a client can have in making API requests
D. to ensure a client uses a multifactor authentication mechanism
E. to provide better service and response time to all users

A

A, E

22
Q

Which HTTP response status code indicates that the user is not authenticated to access the site?

A. 201
B. 400
C. 401
D. 403
E. 404

A

C

C

23
Q

In the REST API request URI example http://example.com/update/person?id=42&email=person%40example.com , which term describes the component example.com ?

A. path
B. authority
C. scheme
D. query

A

B

24
Q

Which type of credential information is used for the bearer authentication in REST APIs?

A. a username and password set by the client
B. an MD5 hash string generated by the client application
C. a password encoded using Base64
D. a string generated by an authentication server

A

D

25
Q

*What is the appropriate way to create a virtual environment for Python 3?

a. python3 -virtual myvenv
b. python3 virtual myvenv
c. python3 -m vrt myvenv
d. python3 -m venv myvenv

A

D

26
Q

*What command is used to install Python modules from PyPI?

a. pip load packagename
b. pip install packagename
c. python3 -m pip install packagename
d. python3 -t pip install packagename

A

B,C

27
Q

*What is the standard for indention in Python?

a. One space for each block of code
b. Four spaces for each block of code
c. One tab for each block of code
d. One tab and one space per block of code

A

B

28
Q

*How are comments in Python denoted?

a. // on each line you want to make a comment
b. # or ‘” quotation marks encompassing multiline comments
c. /* comment */
d. @$ comment %@

A

B

29
Q

*Which of the following are mutable data types? (Choose two.)

a. Lists
b. Dictionary
c. Integers
d. Tuples

A

A, B

30
Q

*Which of the following would create a dictionary?

a. a= (“ name”,”chris”,”age”,45)
b. a= dict()
c. a= [name, chris, age, 45]
d. a= {“ name”:”chris”, “age”: 45}

A

A, B

31
Q

*What data type does the input() function create when assigned to a variable?

a. List
b. Raw
c. String
d. An auto typed one

A

C

32
Q

*When three single quotation marks are used on the next line directly after defining a
function, what does this indicate?

a. Multi-line text
b. A docstring
c. A string value including double or single quotation marks
d. None of the above

A

B

33
Q

*What are key components of object-oriented programming in Python? (Choose two.)

a. Functions that can be performed on a data structure
b. Attributes that are stored in an object
c. Configuration templates
d. YAML files

A

A, B

34
Q

*Which of the following are benefits of OOP? (Choose all that apply.)

a. Reusable code
b. Easy to follow
c. Low coupling/high cohesion
d. Complex integration

A

A,B,C

35
Q

*Which of the following are used to define a class in Python? (Choose two.)

a. class classname(parent):
b. class classname:
c. def class classname(arg):
d. None of the above

A

A,B

36
Q

*What is a method?

a. A variable applied to a class
b. Syntax notation
c. A function within a class or an object
d. Something that is not used in a class

A

C

37
Q

*Which of the following describes inheritance?

a. A hierarchy for functions in Python
b. Class attributes and methods used as the starting point for another class
c. A function only applied to methods being used in another class
d. None of the above

A

B

38
Q

*Which module provides access to the file system and directory structure?

a. filesystem
b. open
c. system
d. os

A

D

39
Q

*Which module is a testing framework for Cisco infrastructure?

a. pyATS
b. pyang
c. devnetats
d. ncclient

A

A