You are going to create a simple program that can display some information about a given string. The string will be a book that you select from the Project Gutenberg.
This exercise is designed to introduce you to:
cs102
folder, create a folder named ex04
for this assignment<untitled>
)
gutenstat.py
and save it in your ex04
folderbook
and assign it the string you copied. It’s a very long string, so we will use notation to start and end a multiline string ("""
).With your choosen book pasted into Thonny and assiged to the variable book
, you will perform the following tasks.
the
occurs. Use the format the: {INSERT NUMBER OF APPEARANCES HERE}
s
occurs. Use the format s: {INSERT NUMBER OF APPEARANCES HERE}
characters: {INSERT NUMBER OF CHARACTERS HERE}
' '
.There are useful string methods that may help you with your tasks.
Right click your assignment folder and choose compress
on MacOS or Compress to ZIP file
on Windows. Upload the zip file to the matching Moodle assignment to submit your work.
You will earn up to 5 points for this exercise, broken down as follows: