6. Python Program to Create a Name Card Using Tabs
EasyEscape sequences
Overview
This task focuses on the use of escape sequences in Python, specifically the \t tab character. By completing this exercise, you will learn how to create neatly formatted output using tabs in your string.
Problem Statement
Write a Python program that prints a name card using tabs for alignment. The output should look like this:
Name: Rahul
Age: 20
Gender: Male
Input
- No input is required.
Output
Your output should match the following format exactly:
Name: Rahul
Age: 20
Gender: Male
Hints:
- Use the
\tescape sequence to add tabs for alignment in yourprint()statement. - Ensure the format of your output matches exactly, including spacing, capitalization, and punctuation.
Take your time and practice formatting outputs for professional results!