Python - Write a program to read your name, contact number, email, and birthdate and print those details on the screen.

Python - Write a program to read your name, contact number, email, and birthdate and print those details on the screen.

Steps:

- Create a file with .py extension. - Write solution of given problem and save - Run to get the Output

Solution/code: Details.py file

# Taking name as input name = input("Enter your name: ") # Taking contact number as input contactno = input("Enter your contact number: ") # Taking email address as input email = input("Enter your email address: ") # Taking Date of birth as input dob = input("Enter your dob: ") # Display Details on Screen print("Hello, " + name) print("Contact No., " + contactno) print("Email ID: , " + email) print("Date of Birth: , " + dob)

Output

Enter your name: PRG Enter your contact number: 9898989898 Enter your email address: bitsofcomputer@gmail.com Enter your dob: 21-03-1991 Hello, PRG Contact No:9898989898 Email ID:bitsofcomputer@gmail.com Date of Birth:21-03-1991

Explanation:

print(): used to print a python objects(string, list, tuple, etc.). - Syntax: print(object(s), sep, end, file, flush) - input() : to take user input.

Try Your code Here

# type your code Here # Taking name as input name = input("Enter your name: ") # Display Details on Screen print("Hello, " + name)

Dose of Motivation

Improve by 1% a day - Quote of the day

"Improve by 1% a day, and in just 70 days, you're twise as good" - Alan Weiss [ Dear Me ]


Post a Comment

0 Comments