Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Lab Activity

Topic:- Shell Scripts for programming


Course code:- S2021 CST102-81
Under guidance of Professor Gurpreet Kaur
Student ID:- A00127469
Student Name:- Mehakpreet Kaur

P.T.O
1. Write a script to find if a number is single digit or double.
2. Write a script to enter your first name and last name and
then print your concatenated name.
3. Write a script to print smallest of three numbers.
4. Write a script to enter two numbers and do all arithmetic
operations on that. (+,-,*,/,%)
5. Write a script to print result according to grades.
6. Write a script to find area of rectangle
7. Write a script to find area of square
8. Write a script to find if a number is positive or negative or Zero
9. Write a script to print grades as following (&&)
80-100 : A grad 70-79 : B grade 60-69 : C grade
40-59 : D grade < 40 : FAIL
10. Write a script to print marks of 5 subjects then calculate
average.
11. write a script to print result “youngster “ if you are between age
20 to 40.
12. write a script to print to compare two strings “Linux” and “unix”
13. Write a script to print odd and even numbers from any range.
14. Write a script to print either the year entered is a leap year or no

You might also like