read details of a Student
Aim:
☛ Read the name, address, email and phone number of a person through the keyboard and print the details.
Solution :
PROGRAM: (Details.py)
Name = input("Enter Person Name : ")
Address = input("Enter Person Address : ")
Email = input("Enter Person Email : ")
Phone_no = input("Enter Phone number : ")
print(" Please Confirm your provided Information\n " )
print(" Person Name : " ,Name )
print(" Person Address : " , Address )
print(" Person Email : " , Email )
print(" Person Phone_no : " , Phone_no )
OUTPUT:
Enter Person Name: Madhu
Enter Person Address : HYDERABAD
Enter Person Email : madhu@gmail.com
Enter Person Phone_no : 9656123456
Please Confirm your provided Information
Person Name : Madhu
Person Address : HYDERABAD
Person Email : madhu@gmail.com
Person Phone_no : 9656123456
๐ป Run This Python Program
read details of a Student
The selected Python program is loaded
automatically into the editor.
Edit the program, provide input if required
and click Run.
The compiler is embedded using OneCompiler.
Your Python program runs inside the embedded
Python environment; Study Glance does not execute
Python code directly on your web server.
Related Python Lab Programs
๐
Python Basics
1.
Use a web browser to go to Python website http://python.org. Start Python interpreter and type help().
View Solution โ
3.
Write a Python program to calculate compound interest for given principal amount, rate of interest and number of periods.
View Solution โ
4.
Write a Python program to read name, address, email and phone number through keyboard and print them.
Current
6.
Write a Python program to check whether the given input is a digit, lowercase letter, uppercase letter or special character.
View Solution โ
7.
Write a Python program to print all prime numbers in a given interval using break.
View Solution โ
๐
Arrays, Lists and Tuples
4.
Write a Python function is_sorted() to check whether the elements of a list are sorted.
View Solution โ
5.
Write a Python function has_duplicates() to check whether a list contains duplicate elements.
View Solution โ
6.
Write a Python function remove_duplicates() to remove duplicate elements from a list.
View Solution โ
๐ค
Strings and Dictionaries
1.
Write a Python program to add single-letter words such as I, a and an empty string to a given word list.
View Solution โ
3.
Write a Python program to add a comma between every character of a string. Example: Apple โ A,p,p,l,e.
View Solution โ
4.
Write a Python program to remove a given word from all occurrences in a string.
View Solution โ
5.
Write a Python function to capitalize the first letter of each word in a sentence and convert the remaining letters to lowercase without built-in functions.
View Solution โ
๐
Recursion and Matrices
1.
Write a recursive Python function to generate all binary strings of n-bit length.
View Solution โ
โ๏ธ
Modules, Exceptions and Classes
1.
Create a Python module and demonstrate its use with geometric shapes and operations.
View Solution โ
3.
Define draw_rectangle(Canvas, Rectangle) and write a Python program to draw a rectangle.
View Solution โ
4.
Add a color attribute to the Rectangle class and modify draw_rectangle() to draw a colored rectangle.
View Solution โ
6.
Create a Circle class and write a Python program with draw_circle() to draw a circle.
View Solution โ
๐
Validation and File Handling
1.
Write a Python program to read phone number and email address and validate them.
View Solution โ
3.
Write a Python program to open a file, check whether specified words are present and display the words when found.
View Solution โ
4.
Write a Python program to read a text file and find the word with the most number of occurrences.
View Solution โ
5.
Write a Python program to find the number of words, vowels, blank spaces, lowercase letters and uppercase letters in a text file.
View Solution โ
๐
Python Libraries, Logic Gates and GUI
3.
Write a Python program to implement Digital Logic Gates: AND, OR, NOT and EX-OR.
View Solution โ
4.
Create a GUI window wizard with two text labels, two text fields, Submit and Reset buttons.
View Solution โ