The Office, Built with Strings

The Office, Built with Strings

calendar_today agoschedule1 min read
— Originally published at dev.to

My simple Python Employee Info Card project that helps users create a basic employee profile then also displays the details in a clear and easy way. Basically, it turns the boring office task into Python practice.

The Employee Info Card

first_name = "John" # Place Holder
last_name = "Doe" # Place Holder

full_name = first_name + " " + last_name
address = "123 Main Street" # Place Holder
address += ", Apartment 4B" # Place Holder

employee_age = 28 # Place Holder

employee_info = full_name + " is " + str(employee_age) + " years old"
print(employee_info)

experience_years = 5 # Place Holder
experience_info = "Experience: " + str(experience_years) + " years"

print(experience_info)
position = "Data Analyst" # Place Holder

salary = 75000 # Place Holder
employee_card = f"Employee: {full_name} | Age: {employee_age} | Position: {position} | Salary: ${salary}"

print(employee_card)
employee_code = "DEV-2026-JD-001" # Place Holder

department = employee_code[0:3]
print(department)
year_code = employee_code[4:8]
print(year_code)
initials = employee_code[9:11]
print(initials)
last_three = employee_code [-3:]
print(last_three)

Features

  • Combines first and last name into a full name
  • Adds extra address details using string concatenation
  • Uses an f-string to display information neatly
  • Creates an experience summary
  • Formats an employee card with name, age, position, and salary
  • Extracts information from their employee code

1 Comment

1 vote
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Dashboard Operasional Armada Rental Mobil dengan Python + FastAPI

Masbadar - Mar 12

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

Implementing Cellular Redundancy: Cross-Cloud Failover with AWS Transit Gateway and Azure ExpressRou

Cláudio Raposo - May 5

Everyone says DeepSeek is cheaper, but I got tired of guessing the exact math. So I built a calculat

abarth23 - Apr 27
chevron_left
216 Points6 Badges
4Posts
0Comments
1Connections

Commenters (This Week)

6 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!