Course Assignments
Module 1 Chapter 6 Quiz Answers
Python String and Loop Quiz Question 1 What does the following Python program print out? str1 = "Hello" str2 = 'there' bob = str1 + str2 print(bob) A. Hello B. there C. 0 D. Hellothere E. Hello ✅ Correct Answer: D. Hellothere 🔹 Explanation:The + operator concatenates (joins) strings in Python. "Hello" + "there" results… <a href="https://codeshala.io/platform/coursera/course/python-data-structures/assignment/module-1-chapter-6-quiz-answers/" rel="bookmark"><span class="screen-reader-text">Module 1 Chapter 6 Quiz Answers</span></a>
Python Data Structures Module 1 Assignment 6.5 Quiz Answers
6.5 Write code using find() and string slicing (see section 6.10) to extract the number at the end of the line below. Convert the extracted value to a floating point number and print it out. Answer: text = “X-DSPAM-Confidence: 0.8475”; startPos = text.find(‘:’) piece = text[startPos+1:] end = float(piece) print(end) Explanation: Given Line of… <a href="https://codeshala.io/platform/coursera/course/python-data-structures/assignment/python-data-structures-module-1-assignment-6-5-quiz-answers/" rel="bookmark"><span class="screen-reader-text">Python Data Structures Module 1 Assignment 6.5 Quiz Answers</span></a>