Answer:
Here is the bash shell script:
scorefile="scores_bash"
guess=-1
typeset -i n=0
echo -e "guess.bash - Guess a number between 0 to 128\n"
(( answer = RANDOM % 128 + 0 ))
while (( guess != answer )); do
n=n+1
read -p "Enter guess $n: " guess
if (( guess < answer )); then
echo "Low guesss"
elif (( guess > answer )); then
echo "High guess"
fi
done
echo -e "You guessed the number in $n guesses.\n"
read -p "Enter your name: " name
echo $n $name >> $scorefile
echo -e "\nScores"
sort -n $scorefile
Explanation:
The program creates a scorefile as scores_bash to store the names and scores. Next the program initializes the guess with -1. guess is used to store the guess made by user and n is used to store the number of trials user took to guess the correct number. Next the program prompts the user to: Guess a number between 0 to 128 and generates random numbers from 0 to 128 and store it into answer. Next the while loop keeps repeating until the user guesses the correct number. If the user guess is less than the correct answer then the program displays the message Low guess otherwise displays High guess. When the user guesses the correct number, the loop breaks and the message You guessed the number in $n guesses. is displayed where in place of $n the number of trials user take to guess the number is displayed. Next the user is asked to enter his name.
echo $n $name >> $scorefile
statement adds the n which is the user score and name which is the names of user to the score file. sort -n $scorefile sorts the file in ascending order to display the lowest scores. The screenshot of program with its output is attached.
I see a set on Amazon, it says they are for tight spaces.
You will use a <select> for this. For example:
<select name="choice">
<option>First</option>
<option>Second</option>
<option>Third</option>
<option>Fourth</option>
<option>Fifth</option>
</select>
A world have 2^128 (340 undecillion) of IPv addresses that helps to connect to the internet. IPv6 addresses can make it easier for working organizational teams connecting to the Internet, IP addresses that are created by IPv6 are 128 bits.
<h3>What is internet?</h3>
Internet is the system uses the Internet protocol suite (TCP/IP) and interconnected computer networks that communicate between two or more individuals.
Today, almost 20 IP addresses are taken by7 each home for each electronic device. The internet usage is so wide, that even a simple task is not possible without it. Even a simple task can be done using internet.
Learn more about internet.
brainly.com/question/13308791
#SPJ1