0% found this document useful (0 votes)
12 views7 pages

Linux (1)

The document is an assignment from LA GRANDEE International College, submitted by Prabhat Raj Poudel for a Linux course. It outlines five scripting tasks, including age verification for voting, file existence check, even or odd number determination, disk usage monitoring, and a basic calculator operation. The assignment is due on December 4, 2024, and is directed to Mr. Ranjan Regmi in the Department of BCA.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

Linux (1)

The document is an assignment from LA GRANDEE International College, submitted by Prabhat Raj Poudel for a Linux course. It outlines five scripting tasks, including age verification for voting, file existence check, even or odd number determination, disk usage monitoring, and a basic calculator operation. The assignment is due on December 4, 2024, and is directed to Mr. Ranjan Regmi in the Department of BCA.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

LA GRANDEE INTERNATIONAL COLLEGE

Simalchaur, Pokhara Nepal

Assignment-4
On
Course: Linux

Submitted By: Submitted To:


Student Name: Prabhat Raj Poudel Mr. Ranjan Regmi

Roll Number: 20 (Department Of BCA)

Semester: VII

Signature

Submission Date: December 4, 2024


1.Write a script that:

Prompts the user to enter their age


Checks if the user is eligible to vote (18 or older).
Displays a message indicating if they can vote or not.

Output:
2. Write a script that:
Takes a file name as input.
Checks if the file exists.
If it exists, print “File exists.”
If it doesn’t, print “file does not exist”.

Output:
3. Write a script that:
Accepts a number as input.
Checks if the number is even or odd.
Displays the result.

Output:
4. Write a script that:
Checks the disk usage percentage of the / partition.
If usage is above 80%, print a warning message.
If usage is below or equal to 80%, print "Disk usage is under control."
Output:

5. Write a script that:


Accepts two numbers and an operation (add, subtract, multiply, divide) as input.
Performs the specified operation using if-else.
Displays the result.
Output:

You might also like