Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
523 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Python (34 exercises) |
Topic ==> | Slicing (2 exercises) |
Level ==> | Average difficulty |
Subject ==> | Python training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Open and run the file shown in the folder above. It should give you a list of the 25 most common words in written English, and various ways of analysing them:
There are 7 titles in all, from A to G.
See how many of the bits of information from A to G you can show, using these hints:
Problem | Hint |
---|---|
A - number of words | The len function gives the number of items in any sequence. |
B - first 5 words | Use the syntax sequence[start:stop] . |
C - last 3 words | You can use negative numbers to say how many items before the end of the sequence you want to stop. |
D - every 5th word | Use the syntax sequence[start:stop:step value] . |
E - four-letter words | Use the iterator for X in Y:, and within this loop test whether the len of each item equals 4. |
F - Words starting with w | Use the same iterator syntax, but this time apply the startswith method to each item to see if it begins with a w. |
G - words in order | Tuples are immutable, so use the list function to convert your tuple to a list then apply the sort method. |
Here are the answers you should get to the various parts of this exercise:
These are the words that you should get.
Save this program as Analysing common words.py and close it down.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.