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 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 $ and heshe have
monthly balance of $ then this add function will minus the amount entered. See
the result using check budget function which will show you actual result ie $
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 $ and heshe have
monthly balance of $ then this remove function will add the amount entered. See
the result using check budget function which will show you actual result ie $
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 $ and heshe have
monthly balance of $ then this add revenue function will add the amount entered.
See the result using check budget function which will show you actual result ie $
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 $ and heshe
have monthly balance of $ then this remove revenue function will subtract the
amount entered. See the result using check budget function which will show you actual
result ie $
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.
Exit
This will exit the program.
Task
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 :
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
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 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
