Capstone: Retrieving, Processing, and Visualizing Data with Python Quiz Answers

Week 01: Python for Everybody – A Review

Q1. What is the most common Unicode encoding when moving data between systems?

  • UTF-64
  • UTF-128
  • UTF-16
  • UTF-8
  • UTF-32

Q2. What is the decimal (Base-10) numeric value for the upper case letter “G” in the ASCII character set?

  • 2048
  • 7
  • 1771
  • 17
  • 71

Q3. What word does the following sequence of numbers represent in ASCII:

108, 105, 115, 116

  • open
  • lost
  • http
  • list
  • fuss

Q4. How are strings stored internally in Python 3?

  • UTF-16
  • Unicode
  • Latin

Q5. When reading data across the network (i.e. from a URL) in Python 3, what method must be used to convert it to the internal format used by strings?

  • convert()
  • encode()
  • decode()
  • more()
  • msub()

Q6. Which of the following lines will never print out regardless of the value of “x”?

if x < 2 :
print("Below 2")
elif x < 0 :
else :
print("Something else")
  • Below 2
  • Something else
  • Negative
  • All the lines will print out

Q7. Which of the following lines will never print out regardless of the value for x?

if x < 2 :
print("Below 2")
elif x < 20 :
print("Below 20")
elif x < 10 :
print("Below 10")
else :
print("Something else")
  • Below 10
  • Below 20
  • Something else
  • Below 2

Q8. What would the following Python code sequence print out?

zap = "hello there bob"
  • l
  • e
  • You would get an out-of-range error and the program would fail
  • hello
  • o
  • zap

Q9. Which of the following lines of Python code contains a syntax error?

x = 12
if x < 5:
print("all done")

Correct Answer 3

Q10. What will the following Python program print out?

def fred():
def jane():
  • Zap Zap Zap
  • Zap ABC jane fred jane
  • ABC Zap jane
  • Zap ABC Zap
  • ABC Zap ABC

Q11. Where in the computer is a variable such as “X” stored?

x = 123
  • Central processing unit
  • Secondary Memory
  • Output Devices
  • Input Devices
  • Main Memory

Q12. What is the primary use of the Python dictionary?

  • To make sure that the definitions of the Python reserved words are available in different languages (French, Spanish, etc)
  • To store key / value pairs
  • To look up all of the methods which are available on a Python object
  • To insure that all Python reserved words are properly spelled

Q13. What does the following Python code print out?

stuff = ['joseph', 'sally', 'walter', 'tim']
  • joseph
  • tim
  • walter
  • sally

Q14. What will the following Python program print out? (This is a bit tricky so look carefully).

def hello():
x = 10
x = x + 1
  • Nothing will print
  • Hello
  • There
  • 11
  • 11
  • x = 11

Q15. What will the following Python program print out?

x = -1
for value in [3, 41, 12, 9, 74, 15] :
if value > x :
x = value
  • 15
  • 74
  • 3
  • 9
  • -1

Q16. What will the following Python program print out?

total = 0
for abc in range(5):
total = total + abc
  • 5
  • 4
  • 16
  • 10
  • 6

Q17. The following Python code causes a traceback:

a = "123"
b = 456
c = a + b

Which line fails with a traceback?

  • 3
  • 1
  • 2
  • 4

Q18. In the following example, an error occurs in “line3” that normally causes a traceback if it were not in a try/except.


What is the sequence of lines executed in this program?

  • line1, line4, line5, line6
  • line1, line2, line3, line5, line6
  • line1, line2, line3, line6
  • line1, line2, line3, line4, line5, line6
  • line1, line5, line6

Q19. What would the following Python code print out?

abc = "With three words"
stuff = abc.split()
  • [‘With the’, ‘ee words’]
  • [‘With’, ‘three’, ‘words’]
  • [‘w’, ‘i’, ‘t’, ‘h’]
  • [‘With’, ‘three words’]
  • [‘With three words’]

Q20. What would the following Python code print out?

abc = "With three words"
stuff = abc.split()
  • 14
  • 2
  • 3
  • 16
  • 1

Q21. Which of the following is not a good synonym for “class” in Python?

  • pattern
  • template
  • direction
  • blueprint

Q22. What is “self” typically used in a Python method within a class?

  • The number of parameters to the method
  • To refer to the instance in which the method is being called
  • To terminate a loop
  • To set the residual value in an expression where the method is used

Q23. How is a Python socket different than a Python file handle?

  • The socket does not read all of the data when it is opened
  • You can read and write using the same socket
  • Opening a socket will never fail, while opening a file can fail

Q24. In the following XML, what is “type”?

<phone type="intl">
+1 734 303 4456
<email hide="yes" />
  • An attribute
  • Tag
  • Value
  • XML syntax error
  • Simple element
  • Complex element

Q25. Which programming language serves as the basis for the JSON syntax?

  • JavaScript
  • Python
  • Java
  • PHP
Get All Course Quiz Answers of Python for Everybody Specialization

Course 01: Programming for Everybody (Getting Started with Python)

Course 02: Python Data Structures

Course 03: Using Python to Access Web Data

Course 04: Using Databases with Python

Course 05: Capstone: Retrieving, Processing, and Visualizing Data with Python

Team Networking Funda
Team Networking Funda

Welcome to the official Author Page of Team Networking Funda! Here, we are dedicated to unraveling the intricate world of networking, connectivity, and team dynamics. Our mission is to provide you with insightful, actionable advice and solutions that will help you build strong connections, foster collaboration, and achieve success in all aspects of your professional life.

🌐 Networking Insights: Dive into the art of networking with us, as we explore strategies, tips, and real-world examples that can elevate your networking game. Whether you're a seasoned pro or just starting, we have valuable insights to offer.

🤝 Team Synergy: Discover the secrets to creating high-performing teams. We delve into team dynamics, leadership, and communication to help you unlock the full potential of your team and achieve outstanding results.

🚀 Professional Growth: Explore the tools and techniques that can accelerate your professional growth. From career development to personal branding, we're here to guide you toward achieving your goals.

🌟 Success Stories: Be inspired by success stories, case studies, and interviews with experts who have mastered the art of networking and teamwork. Learn from their experiences and apply their insights to your journey.

💬 Engage and Connect: Join the conversation, leave comments, and share your own networking and team-building experiences. Together, we can create a vibrant community of like-minded professionals dedicated to growth and success.

Stay tuned for a wealth of resources that will empower you to excel in your professional life. We're here to provide you with the knowledge and tools you need to thrive in today's interconnected world.

We are Team Networking Funda, a group of passionate authors and networking enthusiasts committed to sharing our expertise and experiences in the world of networking and team building. With backgrounds in [Your Background or Expertise], we bring a diverse range of perspectives and insights to help you navigate the challenges and opportunities of professional networking and teamwork.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!