Cisco Certified DevNet Associate DEVASC 200-901 Official Cert Guide

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Flashcards to help study the topics in the 'Introduction to Python' chapter.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

What is the command: pip install packagename used for?

To install Python modules from PyPI.

2
New cards

What is the standard for indention in Python?

Four spaces for each block of code.

3
New cards

How are comments in Python denoted?

or ''' quotation marks encompassing multiline comments

4
New cards

Which of the following are mutable data types?

Lists and Dictionaries.

5
New cards

Which of the following would create a dictionary?

a= dict() and a= {" name":"chris", "age": 45}

6
New cards

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

String

7
New cards

Which print statement is valid for Python 3?

print('hello world')

8
New cards

How do if statements operate?

All of the above are correct.

9
New cards

Which statements are true about the range() function?

The range() function iterates by one, starting at 0, up to but not including the number specified and A range() function can count up or down, based on a positive or negative step value.

10
New cards

What does a virtual environment allows you to do?

Lock in the components and modules you use for your app into a single “package,” which is a good practice for building Python apps.

11
New cards

Why has the Python language become the most popular language in infrastructure automation?

Python language has become the most popular language in infrastructure automation because it is super easy to pick up and doesn’t have all of the crazy syntax and structure that you see in languages like Java or C.

12
New cards

What is the string data type?

A sequence of characters and uses quotes to determine which characters are included.

13
New cards

What does the list.append(element) method do?

Adds an element to the end of the list.

14
New cards

What is the difference between tuples and lists?

The biggest difference between the two comes down to mutability. Lists are mutable, and tuples are immutable.

15
New cards

What is a while loop?

Awhile loop is a conditional loop, and the evaluation of the condition (as in if statements) being true is what determines how many times the loop executes.