Project Level 1: Beginner.
This project is designed for beginner learners who are still learning and practicing Python fundamentals.
Project Description
In this project, you will create a simple program that asks the user to enter their full name, and the program will perform several operations to the user entry as described in the “How Project Works” section further below.
How the Project Works
(1) First your program prompts the user to enter their name (first and last) in the terminal (2) The user types in their name. (3) Then, your program displays the user’s name in uppercase and then in lowercase. (4) Next, the total number of characters is displayed. (5) Lastly, the program reverses the user’s name and displays it.
Prerequisites
Required Libraries: No libraries are required.
Required Files: No files are required.
IDE: You can use any IDE on your computer to code the project.
Project Skills Needed
This project covers the following concepts. Click any link to learn more about them if you're unfamiliar.
input() function | print() function | strings | len() function
Danger Zone
If you get stuck, feel free to view the step-by-step instructions to help you solve the project:
Once you've coded the project, compare it with our solution below:
I have done mine.
def string_manipulation():
name = input("Please enter your full name: ")
name_without_spaces = name.replace(" ", "")
print(f"Your name in uppercase is {name.upper()}.")
print(f"Your name in lowercase is {name.lower()}.")
print(f"Total number of characters (excluding spaces): {len(name_without_spaces)}.")
print(f"Your name reversed is {name[::-1]}.")
string_manipulation()