Question: linux 1 . Add an Expense: Write the function which will add the expense for particular user which will subtract the actual amount per month.

linux 1. Add an Expense:
Write the function which will add the expense for particular user which will subtract the
actual amount per month. Lets say user have added expense $100 and he/she have
monthly balance of $5000 then this add function will minus the amount entered. See
the result using check budget function which will show you actual result i.e. $4900.
2.Remove an Expense:
Write the function which will remove the expense for particular user which will add the
actual amount per month. Lets say user have removed expense $100 and he/she have
monthly balance of $5000 then this remove function will add the amount entered. See
the result using check budget function which will show you actual result i.e. $5100.
3.Add Revenue:
Write the function which will add the revenue for particular user which will add the
actual amount per month. Lets say user have added revenue $100 and he/she have
monthly balance of $5000 then this add revenue function will add the amount entered.
See the result using check budget function which will show you actual result i.e. $5100.
4.Remove Revenue:
Write the function which will remove the revenue for particular user which will subtract
the actual amount per month. Lets say user have removed revenue $100 and he/she
have monthly balance of $5000 then this remove revenue function will subtract the
amount entered. See the result using check budget function which will show you actual
result i.e. $4900
5.Check Budget Balance:
When the user selects this option, the system simply checks the data for that user
and displays the current balance. Checking the account balance does not alter the
balance itself.
6 Exit
This will exit the program.
Task 2
Your recently acquired Linux, File permission, Bash Shell skills have given you the
confidence . This is your opportunity to take a leadership role as you will be the top
brain in this operation.
Instructions
Use the instructions below to plan and implement your project. It is recommended that
you perform the tasks in the order given below.
How can we get the number of lines or number of words in a file?
The easiest way to count the number of lines, words, and characters in text file is to use
the Linux command wc in terminal.
To count the number of lines, use wc with l as
wc l yourTextFile
To count the number of words, use wc with w option as
wc w yourTextFile
Write a shell script to read the number of lines and print there count in file. (You need
to create any sample file and read it into the program)
Create new text file and read and show the count using shell script. Provide appropriate
file permission while running the shell script.
Task 3:
Develop the classic game "Hangman". First It will ask to enter the username, after
entering the name, Game will start. You need to create the game such that user need to
guess the character from the word.
The word to guess is represented by a row of dashes. If the player guesses a letter
which exists in the word, the script writes it in all its correct positions. The player has
10 turns to guess the word. You can easily customize the game by changing the
variables.
Example: The variable value used in game is Employee then user need to guess the
character from number, if the character matches with in the word then It will added as
a dashes.
Following output, it should display:
What is your name? Usama
Hello, Usama Time to play hangman!
Start guessing...
______
guess a character: a
Wrong
You have 9 more guesses
______
guess a character: s
s _____
guess a character: e
s e __ e _
guess a character: c
s e c _ e _
guess a character: r
s e c r e _
guess a character: e
s e c r e _
guess a character: t
s e c r e t You won

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!