Wednesday, October 18, 2023

Python Programming - Lab- Core Lab 5 - bharathiar University - Program 1 - Write a python program that displays the following information: Your name, Full address Mobile number, College name, Course subjects

 Python Programming - Lab

Core Lab 5  

Bharathiar University 

Program 1 - Write a python program that displays the following information: Your name, Full address Mobile  number, College name, Course subjects


Source Code

Here's a simple Python program that takes input for full name, address, mobile number, college name, and course subject, and then displays the entered information. 

Below is a Python program that prompts the user for their full name, address, mobile number, college name, and course subject. Then, it displays this information back to the user. Let's go through the code step by step. 

# Taking user input for personal information
full_name = input("Enter your full name: ")
address = input("Enter your address: ")
mobile_number = input("Enter your mobile number: ")
college_name = input("Enter your college name: ")
course_subject = input("Enter your course subject: ")


# Displaying the entered information
print("\nPersonal Information:")
print("Full Name:", full_name)
print("Address:", address)
print("Mobile Number:", mobile_number)
print("College Name:", college_name)
print("Course Subject:", course_subject)



Explanation of the steps:

User Input: The input() function is used to take input from the user.

The program prompts the user to enter their full name, address, mobile number, college name, and course subject.

The entered values are stored in respective variables (full_name, address, mobile_number, college_name, course_subject).

Display Information: The collected information is displayed back to the user using the print() function.

Each piece of information is printed along with its corresponding label.

When you run this program, it will ask you for the mentioned details one by one.

After you provide the input, it will display the entered information back to you.

Remember, you can run this Python code in any Python environment,

such as IDLE, Python shell, or a code editor like Visual Studio Code or PyCharm.


OUTPUT:
Enter your full name: Ram
Enter your address: 127, Ambedkar street, coimbatore
Enter your mobile number: 1234567890
Enter your college name: psg college of arts and science
Enter your course subject: python programming,data warehousing and data mining, deep learning

Personal Information:
Full Name: Ram
Address: 127, Ambedkar street, coimbatore
Mobile Number: 1234567890
College Name: psg college of arts and science
Course Subject: python programming, data warehousing and data mining, deep learning

No comments:

Post a Comment

Program 12 BCA Madras University BCA Object Oriented Programming using C++ Practical Madras University Program 12 Implement a telephone directory using files

  BCA Object Oriented Programming using C++ Practical Madras University  Program 12  Implement a telephone directory using files SOURCE CODE...