Project Level 1: Beginner
This project is designed for beginner learners who are still learning and practicing Python fundamentals.
Project Description
Write a program that takes a list of words and finds the longest word in that list. The program should also display the length of that word.
Start by placing the following list in your script:
words = ["apple", "banana", "cherry", "blueberry"]
Below is what your program should output.
As you can see above, the program has found the longest word and it has printed out a message which also includes the length of the longest word. It is recommended to use an f-string to construct that message.
Learning Benefits
String Operations: Practice calculating string lengths using
len()
.List Iteration: Get hands-on experience iterating over a list with a
for
loop.f-string: Use f-strings to construct a string out of other strings and variables.
Prerequisites
Required Libraries: No libraries are needed for this project.
Required Files: No files are needed for this project.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
Go to our solution code using the following button:
Happy coding!
Daily Python Projects Team