In a Linux system, the shell is a command-line interface that interprets a user's commands and script files, and tells the server's operating system what to do with them. <span> The shell is a program that takes commands from the keyboard and gives them to the operating system to perform.</span>
Answer:
- import statistics
- def st_dev(file_name):
- with open(file_name) as file:
- data = file.readlines()
- numList = []
- for x in data:
- numList.append(int(x))
-
- return statistics.pstdev(numList)
- print(st_dev("text1.txt"))
Explanation:
The solution code is written using Python.
To ease the calculation task, we can import Python statistics module to use the pstdev method to calculate the population standard deviation of a list of numbers (Line 1).
Next, create a st_dev function that take single argument file_name (Line 3). In the function, it will open the input file and read the data line by line (Line 4-5). Create a for loop to traverse through each line of the data which is an integer and append it to numList (Line 7-8). We can pass the numList to pstdev method (Line 10) and return the resulting standard deviation value as output.
We test the function by passing a file which hold a list of integer values in each line (Line 12).
8
9
12
11
21
15
16
10
7
13
And the output we shall get is 4.019950248448356
The statement above is TRUE.
According to Google operating system, new users who signed up for google account will automatically get a gmail and google plus accounts. User can later delete the google plus account if they are not interested in it.
Answer:
import java.util.Scanner;
public class CocaColaVendingTest {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter value for number of insects");
int num_insects = in.nextInt();
while (num_insects<=100){
System.out.print(num_insects);
num_insects*=2;
System.out.print(" ");
}
}
}
Explanation:
In the code above written in Java.
The user is prompted to enter a positive value for the number of insects
This is stored in a variable num_insects.
Using a while loop with the condition while (num_insects<=100). The num_insects is printed out. Then it is doubled followed with a space.
It continues until the condition in the while loop is no longer true