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)
OutputEnter 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.
0 Comments