SSN COLLEGE OF ENGINEERING
(Autonomous - Affiliated to Anna University)
DEPARTMENT OF CSE
UGE2197 PROGRAMMING IN PYTHON LABORATORY
Ex 1: Linux Shell Commands & Python in Interactive Mode
Define the following terms:
1. Computer
2. Hardware
3. Software
4. Types of Software
5. Machine level language
6. Assembly level language
7. High level language
8. Operating systems
9. Compiler
10. Interpreter
11. Editor
12. Shell
Linux Shell Commands:
1. File and directory commands
a. ls, ls -l
b. cd, cd ..
c. mkdir
d. cat (displaying, creating, appending options)
e. cp
f. mv
g. chmod
h. wc
i. find
2. System related commands
a. who
b. whoami
c. pwd
d. date
e. man
f. echo
g. cal
h. bc
3. Create a new directory named “SSN”, a subdirectory "BE" under SSN and create a file named
“firstyear.txt” and write about the SSN orientation programme.
4. Rename the firstyear.txt file as orientation.txt
5. Give all permissions to user and only reading permission to others
6. Create a file "AboutMe.txt". Write about yourself and your ambitions.
Working in Python Interactive Mode:
1. Create a variable named num1 with some integer value.
2. Create another variable named num2 with some float value.
3. Create a variable name with your name as input.
4. Display the value of num1, num2 and name.
5. Display the type of num1, num2 and name.
6. Say “Hello “ to name.
7. Find the output of 4+6*7 /2 directly.
8. Find the output of 4+5*7 /3 directly.
9. Find the output of 4+5*7 //3 directly.
10. Find the output of num1 raised to power of num2.