Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 8 - More on Strings and Special Methods - Section 8.2 - The str Class - Check Point - MyProgrammingLab - Page 252: 8.1

Answer

a. True b. 3 c. True d. True e. True f. False g. True h. WELCOME TO PYTHON i. 8 j. o k. ome l. totototo m. 17 n. y o. p. t q. welcome to python r. 15 s. False t. False u. False v. Welcome to PythonWelcome to Python

Work Step by Step

s1 = "Welcome to Python" s2 = s1 s3 = "Welcome to Python" s4 = "to" print(s1 == s2) print(s2.count('o')) print(id(s1) == id(s2)) print(id(s1) == id(s3)) print(s1 <= s4) print(s2 >= s4) print(s1 != s4) print(s1.upper()) print(s1.find(s4)) print(s1[4]) print(s1[4:8]) print(4*s4) print(len(s1)) print(max(s1)) print(min(s1)) print(s1[-4]) print(s1.lower()) print(s1.rfind('o')) print(s1.startswith("o")) print(s1.endswith("o")) print(s1.isalpha()) print(s1 + s1)
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.