Skip to main content

Command Palette

Search for a command to run...

Day 1: Python Print Function, Debugging, and Input Function

A 100-Day Journey of Learning Python

Updated
2 min read

Welcome to my 100 Days of Code learning journal!

I’m following Dr. Angela Yu’s 100 Days of Code: The Complete Python Pro Bootcamp.

In this blog, I'll share my daily progress, challenges, and insights as I work through Python projects—from beginner concepts to advanced applications.

🚀 What I Learned Today

  • How to use the print() function in Python.

  • Debugging common syntax errors.

  • String concatenation using +.

  • Taking user input with the input() function.

💻 Code Snippets / Mini-Project

# Printing a message
print("Hello, world!")  

# Interactive greeting program
name = input("What is your name? ")
print("Hello " + name + "!")

👉 The first snippet shows the basic print() function.
👉 The second snippet uses input() to make the program interactive by greeting the user with their name.

🐞 Challenges & How I Solved Them
❌ Forgot to close quotes in a print() statement → Python threw a syntax error.

❌ Tried using , instead of + when concatenating strings → realized + is the correct operator for strings.

✅ Lesson: Pay close attention to syntax — tiny mistakes can break the code!

✨ Key Takeaways
Python is beginner-friendly but requires precision with syntax.

The input() function adds interactivity, making programs more dynamic.

Day 1: Band Name Generator Project

Tasks:

  • Create a greeting for your program.

  • Ask the user for the city that they grew up in and store it in a variable.

  • Ask the user for the name of a pet and store it in a variable.

  • Combine the name of their city and pet and show them their band name.

  • Make sure the input cursor shows on a new line.

Solutions:

print("Welcome to the Band Name Generator\n")

user_city = input("What city did you grow up in?\n")

user_pet = input("What is the name of your pet?\n")

band_name = user_city + " " + user_pet

print("Your band name could be: " + band_name)

In this solution, the program greets the user and prompts them to enter the city they grew up in and the name of their pet. It then combines these inputs to suggest a potential band name, ensuring the input cursor appears on a new line for clarity.

🔮 What’s Next
Tomorrow (Day 2), I’ll dive into variables and data types.
My personal goal is to write cleaner code with comments and practice naming conventions.

100 Days of Python

Part 1 of 1

Day 1: Python Print Function, Debugging, and Input Function, Band Name Generator Project