Editing Community Data Science Course (Spring 2023)/Week 2 coding challenges

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 11: Line 11:
* Open the file <code>wordplay_examples.ipynb</code> as a Jupyter notebook and run the first cell to make sure that it works.
* Open the file <code>wordplay_examples.ipynb</code> as a Jupyter notebook and run the first cell to make sure that it works.


== #1 Alls well that ends well ==
== #1 Play with pop ==
 
There is a function in Python called <code>pop()</code>. Play around with it in your notebook and try to figure out what it does. When you're one, look it up online and try to confirm your suspicion. Where you right?
 
== #2 Alls well that ends well ==


# Find and print the words that end in "well" and be ready to tell me how many there are.
# Find and print the words that end in "well" and be ready to tell me how many there are.
Line 17: Line 21:
# How about "gry"?
# How about "gry"?


== #2 Counting vowels  ==
== #3 Counting vowels  ==


# How many words start with each vowel? Which is the most common vowel to find at the beginning of a word?
# How many words start with each vowel? Which is the most common vowel to find at the beginning of a word?
Line 23: Line 27:
# Find and print all the words that have all 5 vowels in alphabetical order.
# Find and print all the words that have all 5 vowels in alphabetical order.


== #3 Disemvoweled ==
== #4 Disemvoweled ==


# Find and print the longest word that has no vowels.
# Find and print the longest word that has no vowels.


== #4 A cure for many ells ==
== #5 All that ells me ==


# Find and print the words that contain 4 or more 'l's.
# Find and print the words that contain 4 or more 'l's.
# How many are there?
# How many are there?


== #5 So long ==
== #6 So long ==


# What is the longest word in the word list you've been given? How long is it?
# What is the longest word in the word list you've been given? How long is it?
# Are there more than one word of that length? If so,  tell me how many are that exactly that long.
# Are there more than one word of that length? If so,  tell me how many are that exactly that long.


== #6 Palindromes ==
== #7 Palindromes ==


# Print out a list of every [[:wiki:palindrome|palindrome]] (a word that is the same reversed) that's over 6 letters in length.
# Print out a list of every [[:wiki:palindrome|palindrome]] (a word that is the same reversed) that's over 6 letters in length.
# How many are there?
# How many are there?


== #7 Something fun ==
== #8 Something fun ==


# Pick one other thing off this list of other interesting properties of English words in pages like [http://www.sporcle.com/games/imabanana/uncommonwords this quiz about English words with unusual properties] and write a Python problem to solve it.
# Pick one other thing off this list of other interesting properties of English words in pages like [http://www.sporcle.com/games/imabanana/uncommonwords this quiz about English words with unusual properties] and write a Python problem to solve it.


[[Category:CDSW]]
[[Category:CDSW]]
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)