Editing Intro to Programming and Data Science (Fall 2022)/Week 4 Coding Challenges
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
Chapter 7: | Chapter 7: | ||
* Exercises 1, 2, and 3 | * Exercises 1, 2, and 3 | ||
=== Wordplay Level 2 === | === Wordplay Level 2 === | ||
* For every letter, print the word that uses that character the most. Hint: use two nested for loops. First one is | * For every letter, print the word that uses that character the most. Hint: use two nested for loops. First one is | ||
<syntaxhighlight lang='python'> | |||
for letter in 'abcdefghijklmnopqrstuvwxyz': | |||
# do something | # do something | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Find the longest string where no character appears more than 1 time. (Hint: look up counters) | * Find the longest string where no character appears more than 1 time. (Hint: look up counters) | ||
* Use Python to find one other interesting fact about the data set. Examples (that you can't use) might be: | * Use Python to find one other interesting fact about the data set. Examples (that you can't use) might be: | ||
** One of the words that is tied for the most vowels is aquifoliaceous | ** One of the words that is tied for the most vowels is aquifoliaceous | ||
** The word with the highest consonant to vowel ratio is sulphhydryls | ** The word with the highest consonant to vowel ratio is sulphhydryls |