PRACTICAL 2 python
PRACTICAL 2 python
OF COMPUTER ENGINEERING
Experiment No: 2
Title of Experiment
\1. Write python program display welcome message on screen.
2. Implement the python program to read data from user and display data
on screen.
Practical Significance
Python is a high level language which is trending in recent past. To make it more user friendly
developers of Python made sure that it can have two modes Viz. Interactive mode and
Script Mode. The Script mode is also known as normal mode and uses scripted and
finished .py files which are run on interpreter whereas interactive mode supports command
line shells. Students will able to understand how to run program using Interactive and Script
Mode.
Page | 1
Code :
1:
Output :
2:
Page | 2
Output :
Conclusion:
this practical highlights two key concepts in Python: displaying messages using the print() function and
reading user input with the input() function. These foundational skills are essential for interactive
programs and building user-friendly applications, enabling communication between the program and
2. State the steps involved in executing the program using Script Mode.
Here are the steps involved in executing a Python program using Script Mode:
a. Open a text editor (e.g., VS Code, Sublime Text, or even a simple Notepad) and write your
Python code.
b. Save the file with a .py extension (e.g., program.py).
a. Use the cd (change directory) command to navigate to the folder where your Python
script is saved.
a. Run the Python script by typing python program.py (or python3 program.py
depending on your Python version) and press Enter.
a. Once the program finishes execution, you can close the terminal or run another script.
These steps allow you to write, save, and execute a Python program efficiently in Script Mode.
Page | 4
3. Write a Python program to display “MSBTE” using Script Mode.
print("MSBTE")
Page | 5
Grade and Process Related Product Related Dated Sign
Dated
Signature of (35) (15)
Teacher
Page | 6
Page | 7