You’ll feel confident using Python to build simple programmes, manipulate data, and resolve practical issues at the end of this course. You’ll receive a solid basis for further study in the area and acquire abilities to boost your profession.
Multiple Specialization or Professional Certificate programmes accept this course as credit. Your learning in any of the following programmes will be credited if you successfully complete this course:
- IBM Applied AI Professional Certificate
- Applied Data Science Specialization
- IBM Data Science Professional Certificate
- You will receive a digital Badge from IBM acknowledging your competence in the topic upon completion of any of the aforementioned programmes, in addition to a Specialization completion certificate from Coursera.
- Join Now
Python for Data Science AI & Development Quiz Answers
Week 01: Python Basics
Types – Quiz Answers
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
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
Your First Program, Types, Expressions, and Variables
String Operations – Quiz Answers
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’
Lab String Assessment
Quiz String Operations Docx
Week 02: Python Data Structure
List and Tuples Quiz Answers
Q1. what is the syntax to obtain the first elements of the tuple:
A= (‘a’, ‘b’ ,’c’)
- A[0]
Q2. Consider the tuple A=((1,),[2,3],[4]), that contains a tuple and list. What is the result of the following operation A[2]:
- [4]
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[0])
- [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
Dictionaries Quiz Answers
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 Assements – Dictionary
Sets – Quiz Anwers
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
.
Review:
Based on our knowledge, we urge you to enroll in this course so you can pick up new skills from specialists. It will be worthwhile, we trust.