---
# System prepended metadata

title: 'Week 5 Recap: Python Inputs, Strings & Practical Problem Solving'

---

# Week 5 Recap: Python Inputs, Strings & Practical Problem Solving

This week at Blockfuse Labs was all about turning simple Python concepts into practical problem-solving tools. The focus was on working with user inputs, manipulating strings, and presenting results neatly.

Here’s a breakdown of what we worked on and how each task was solved:


## **Question 1: Bio Length & Slicing**

**Task:**
The goal was to take a user’s bio, find out how long it is, and display specific parts: the first 20 characters, the last 20 characters, and everything after the 20th character.

**How It Was Solved:**
I first determined how many characters the bio contained, which helped me understand how much text I was working with. Then, by slicing the bio, I extracted just the parts required showing the beginning, the end, and the remaining text after a certain point. This exercise taught me how to control exactly what part of a text gets displayed, which is useful in things like social media previews or character limited fields.
See screenshot below:
![Screenshot 2025-07-20 at 11.09.49 PM](https://hackmd.io/_uploads/rJhuFJoLlg.png)



## **Question 2: Bill Splitting Calculator**

**Task:**
To calculate how much each person should pay from a total bill, based on the number of people sharing it.

**How It Was Solved:**
I collected the total bill and the number of people as inputs, converted them to the right data type (numbers), and divided the bill by the number of people to get the amount each person owed. Finally, I presented the result neatly, formatted to two decimal places, which made it look professional and realistic, just like what you see in financial apps.
See screenshot below:
![Screenshot 2025-07-20 at 11.11.43 PM](https://hackmd.io/_uploads/SkxTY1sUgx.png)


## **Question 3: Movie Title Manipulation**

**Task:**
Take a movie name and how many times it has been watched, then:

1. Display the full sentence: “I have watched (movie) (x) times.”
2. Show the movie name in uppercase.
3. Show only the last three letters of the movie name.

**How It Was Solved:**
I combined the movie name and the number of times watched into one sentence to make it sound conversational and interactive. Then, I transformed the movie title to uppercase to emphasise it, and extracted only the last three characters, which felt like creating a short movie code or abbreviation. This exercise showed how flexible strings can be when making outputs more dynamic.
See screenshot below:
![Screenshot 2025-07-20 at 11.13.02 PM](https://hackmd.io/_uploads/rJvbqyiUgx.png)


## **Question 4: Step Tracker Summary**

**Task:**
Ask for the number of steps taken over three days, then calculate and display the total steps and the average steps per day.

**How It Was Solved:**
The steps for each day were collected individually, then added together to get the total. To find the average, I divided the total by three. The results were presented clearly, and the average was rounded to two decimal places for better readability. This task felt very practical because it mimicked how a basic fitness tracker might summarise your activity.
See screenshot below:
![Screenshot 2025-07-20 at 11.14.02 PM](https://hackmd.io/_uploads/BknBq1oLge.png)


## **Question 5: Password Masking**

**Task:**
Take a user’s password and:

1. Show how many characters long it is.
2. Reveal only the first and last characters.
3. Replace all the middle characters with asterisks for security.

**How It Was Solved:**
I first determined the total length of the password. Then I kept only the first and last characters visible while replacing everything in between with asterisks. This was interesting because it felt like applying a real-world security feature, similar to how apps hide passwords when you type them.
![Screenshot 2025-07-20 at 11.15.06 PM](https://hackmd.io/_uploads/S16qcyiIxg.png)


## **The Highlight of the Week**

This week was important because it moved beyond just writing random Python code. Each task felt like solving a real-world problem:

* Controlling how much text users see
* Doing simple financial and fitness calculations
* Making outputs look clean and professional
* Even simulating basic security practices

Every small step built my confidence in handling user input, working with strings, and presenting data in a clear way, the building blocks of real applications.

