DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1
print('Done!')
Enter some text to print.
Type "done" to quit> Good luck on the test!
Good luck on the test!
Enter some text to print
Type "done" to quit> done
Done!

Notice the condition this example is checking with the
while statement. Because True will always be True
from an evaluation perspective, the while condition is
automatically met. Without that if statement looking for
the string 'done', your loop would keep asking for input
and printing what you typed forever.


This chapter provides an overview of some of the key
concepts and capabilities in Python. The goal is to
prepare you to be able to read and understand code
snippets that you might see on the DEVASC exam. The
next two chapters dive into other aspects of working with
Python and Cisco APIs that are considered essential
skills. Make sure you have followed along with the code
examples here and that you are familiar with how to
construct these basic examples. The following chapters
build on these skills.


EXAM PREPARATION TASKS


As mentioned in the section “How to Use This Book” in
the Introduction, you have a couple of choices for exam
preparation: the exercises here, Chapter 19, “Final
Preparation,” and the exam simulation questions on the
companion website.


REVIEW ALL KEY TOPICS


Review the most important topics in this chapter, noted
with the Key Topic icon in the outer margin of the page.

Free download pdf