# Python for Data Science, AI & Development Quiz Answers

Here you will find Python for Data Science, AI & Development Coursera course Quiz Answers. Data science is relatively a new field that deals with the study of data. In data science, a large amount of data is studied to extract meaningful insights for business. Data science is a multidisciplinary approach that combines principles and practices from the fields of computer science, mathematics, statistics, and artificial intelligence.

This analysis of data helps data scientists to ask and answer questions like what happened, why it happened, what will happen, and what can be done with the finding results.

## Python for Data Science, AI & Development Quiz Answers

Python for Data Science, AI & Development is one of the courses from the IBM Data Science Professional Certificate on Coursera.

### Week 01: Python Basics Quiz Answers

Topic: Types

Q1. What is the type of the following: 1.0

• Float

Q2. What is the type of the following: “7.1”

• String

Q3. What is the result of the following code segment: int(3.99)

• 3

Q4.  What is the result of the following code segment: int(True)

• 1

Topic: Expression and Variables Quiz Answers

Q1. What is the result of the following code segment:1//2

• 0

Q2. What is the value of x after the following lines of code:

x=2

x=x+2

• 4

Q3. What is the result of the following operation 1+3*2

• 7

Q4. In python 3, What is the type of the variable x after the following: x=2/2

• Float

Topic: Your First Program, Types, Expressions, and Variables

Topic: String Operations

Q1. In Python, if you executed name = ‘Lizz’, what would be the output of print(name[0:2])

• Li

Q2. Consider the string A=’1934567′, what is the result of the following operation A[A::2]

• ‘946’

Q3.  In Python, what is the result of the following operation: ‘1’+’2′

• ’12’

Q4. Given myvar = ‘hello’, how would you convert myvar into uppercase?

• myvar.upper()

Q5. Consider the string Name=” ABCDE” , what is the result of the following operation Name.find(‘B’)

• 1

Q6. what is the result of the following: str(1+1)

• ‘2’

Q7. what is the result of the following: “ABC”.replace(“AB”, “ab”)

• ‘abC’

Topic: Lab String Assessment

Topic: String Operations Docx

### Week 02: Python Data Structure Quiz Answers

Topic: List and Tuples Quiz Answers

Q1. what is the syntax to obtain the first elements of the tuple:

A= (‘a’, ‘b’ ,’c’)

• A

Q2. Consider the tuple A=((1,),[2,3],), that contains a tuple and list. What is the result of the following operation A:

• 

Q3. What is the result of the following operation: ‘A,B,C,D’.split(‘,’)

• [‘A’, ‘B’, ‘C’, ‘D’]

Q4. After applying the following method, L.append([‘a’, ‘b’]), the following list will only be one element longer.

• True

Q5. list are mutable

• True

Q6. consider the following list : A=[“hard rock”,10,1.2]. what will list A contain affter the following command is run: del(A)

• [10, 1.2]

Q7. what is the syntax to clone list A and assign the result to list B

•  B=A[:]

Q8.  what is the result of the following: len((“disco”,10,1.2, “hard rock”, 10))

• 5

Lab 1: Tupels

Lab 2: Strings

Topic: Dictionaries

Q1. Consider the following dictionary: { “The Bodyguard”:”1992″, “Saturday Night Fever”:”1977″}

select the keys

• “The Bodyguard”
• “Saturday Night Fever”

Q2. The variable release_year_dict is a Python Dictionary, what is the result of applying the following method: release_year_dict.keys()

• retrieve the keys of the dictionary

Q3. What is wrong with the following dictionary; {‘a’:1, ‘a’:2}

•  it has duplicate entries for the keys

Lab Assessments – Dictionary

Topic: Sets

Q1. How do you cast the list A to the set a?

• a=set(A)

Q2. Consider the Set: V={‘1′,’2’}, what is the result of V.add(‘3’)?

•  {‘A’,’B’,’C’}

Q3. what is the result of the following: ‘1’ in {‘1′,’2’}

• True

Lab Assessment – Sets

### Week 03: Python Programming Fundamentals Quiz Answers

Topic: Conditions and Branching

Lab Assessment

Topic: Loop

Lab Assessment

Topic: Function

Lab Assessment

Topic: Classes

Lab Assessment

### Week 04: Working with Data in Python Quiz Answers

Lab Assessment

Topic: Writing with File Open

Lab Assessment

Topic: Pandas

Lab Assessment

Topic: One Dimensional Numpy

Lab Assessment

Topic: Two Dimensional Numpy

Lab Assessment