0% found this document useful (0 votes)
35 views

Lab Activity

This document outlines a lab activity for a shell scripting course. It provides 14 programming challenges for students to complete under the guidance of Professor Gurpreet Kaur. The challenges include writing scripts to determine if a number is single or double digit, concatenate and print a name, compare numbers and strings, calculate averages, and determine if a year is a leap year. The document identifies the student, Mehakpreet Kaur, and their student ID for the course.

Uploaded by

Mehak preet Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Lab Activity

This document outlines a lab activity for a shell scripting course. It provides 14 programming challenges for students to complete under the guidance of Professor Gurpreet Kaur. The challenges include writing scripts to determine if a number is single or double digit, concatenate and print a name, compare numbers and strings, calculate averages, and determine if a year is a leap year. The document identifies the student, Mehakpreet Kaur, and their student ID for the course.

Uploaded by

Mehak preet Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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