Write a short, interactive shell script that
Asks the user for a numeric variable A
Asks the user for a numeric variable B
Echoes the text “A minus B equals:”
echo "Numeric variable A :"
read A
echo "Numeric variable B :"
read B
echo "A minus B equals: $(( A - B ))"
Write a short, interactive shell script that Asks the user for a numeric variable A Asks...
1. Write a C shell script called greeting that asks the user how they are doing today. If the user enters anything other than “fine”, the script should ask the user again how they are doing. Eventually, when the user enters “fine” for their answer, the script should write out a message saying the computer is fine too. You will need to use a while loop
In Matlab, write a script which asks a user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order. For example, if the user inputs “4,-1,5,2,-3,-8,0” the script should print “2,5,4”.
Write a script which asks the user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order E.G. if the user inputs '4, -1, 5, 2, -3, -8, 0', the script should print '2, 5, 4'. Please don't copy someone else's answer as they don't work.
Write a script that asks the user to input a number. If the value the user enters is a negative value, call the pre-defined function neg_value which consumes no arguments and returns no values. If the user enters a positive value, call the pre-defined function pos_value which consumes no arguments and returns no values. If the user enters a zero, display the message "Invalid Value". Doing this on Python. This is what I have: number = int(input("Enter a number: "))...
USING MATLAB Write a script that asks the user to input a sentence. It then replaces all instance of 'he', 'she', 'He', or 'She' with 'Mr. Meseeks' and prints out the new sentence. . HINT: Use 'strrep' and 'lower' function.
3. Write a script (name it /opt/book/ scripting /results/exercise3) which: a. Asks the user for the length and width (in feet) of a rectangular room b. Calculates the area of the room c. Displays the result to the user [Show the ouput via screenshot]
This question is for MATLAB. Write a script that continuously asks the user for a new sentence, until the user types the word "STOP". The program records all of the sentences the user wrote (not including "STOP") in a matrix with as many rows as needed but with an N number of columns. The user is prompted to provide N before typing in the first sentence. The output of the program is the array with the sentences in it, in...
Write a short program in Java that asks the user for an integer. Then ask the user for a letter. Print out the letter followed by the integer.
Script 1: Sum of Numbers Write a python program that asks the user to enter a series of single-digit numbers with nothing separating them. The program should display the sum of all the single digit numbers in the string. For example, if the user enters 2514, the method should return 12, which is the sum of 2, 5, 1, and 4.
a. Write a line of code that asks the user what their favorite number is, that only accepts numeric input, and saves the answer in variable D1. b. Write a line of code that asks the user what their favorite color is, that only accepts string input, and saves the answer in variable D2. c. Construct a 1x2 string matrix L1 where the string “HYPE” is the first element and the string “EXHAUSTED” is the second element. d. Using the...