Difficulty: Low
Title: Find the Average
Description:
Create a program that takes user input of five numbers and determine the average.
Output:
Number: 20
Number: 15
Number: 1
Number: 5
Number: 10
List: 1, 5, 10, 15, 20
Average: 10
Difficulty: Low
Title: Find Words Longer Than
Description:
Write a Python program to find the list of words that are longer than a given length from a given list of words.
Output:
Word: charity
Word: utter
Word: snow
Word: bench
Word: at
Word Length: 5
List: charity, utter, snow, bench, at
Words Matching: charity, utter, bench
Difficulty: Medium
Title: Same Characters
Description:
Create a program that takes five user inputs and puts them into a list to count the number of strings that match the following criteria:
Output:
Word: aba
Word: cat
Word: that
Word: dog
Word: pop
List: aba, cat, that, dog, pop
Count: 3
Difficulty: High
Title: Comparing Lists
Description:
Create a program that prompts the user for two lists of five words each and compare the lists for similarities and differences between the two lists.
Output:
Word: cat
Word: dog
Word: fish
Word: bat
Word: cow
Word: dog
Word: eel
Word: bat
Word: ant
Word: lama
List One: ['cat', 'dog', 'fish', 'bat', 'cow']
List Two: ['dog', 'eel', 'bat', 'ant', 'lama']
Similarities: dog bat
Differences: cat fish cow eel ant lama
Difficulty: High
Title: One Letter Change Up
Description:
Write a program to prompt the user for a short word, three to five letters. Read from a dictionary (see Python - Sample Code and see how many words you can find by changing one letter at a time).
# creating variable to store the
# number of words
number_of_words = 0
# Opening our text file in read only
# mode using the open() function
with open(r'SampleFile.txt','r') as file:
# Reading the content of the file
# using the read() function and storing
# them in a new variable
data = file.read()
# Splitting the data into separate lines
# using the split() function
lines = data.split()
# Printing total number of words
print(lines)
Output:
Input a string: boat
boat
coat
doat
goat
moat
toat
beat
bhat
...