Q1. Write a program which computes the following s= _- for given M and M. 1-1 7-1 (Hint: Your code has to include for-loop and while-loop). Q2. Write a program with while-loop so that for given list _ = [n,n,.....",] (Define L yourself). it computes the M = [I ", Q3. Write a program that takes two integer values a and b from the command line and prints them in ascending order, separated by a space. Hint: To enter a values, you can use readline(prompt "Enter an integer: "). However this reads the input as a string you need to convert it to integer by usin as.numeric(readline(prompt="Enter an integer: ")) DO NOT USE EMBEDDED CODES SUCH AS SORT OR MAX, MIN ETC. Q4. Ask user to enter as much as number. To finish entering the numbers, the user has to write stop. When all the values available, calculate the mean, variance, standard deviation, minimum and maximum of the given values. Hint: Create an empty vector by using vector( . You can calculate the mean, variance, standard deviation, minimum and maximum of the given values by using mean, var, sd, max and min. respectively. (5. How to get the w" smallest value of given array? (Use for loop for this problem. Do not use existing codes. Use your own codes). DO NOT USE ANY KINDS OF SORT FUNCTIONS. For example, in given list [1 1,23,58,31,56,77,43, 12,65,19], if n is defined as 3. The program will print 19.Q6. How to get the w" largest even value of given array? (Use while loop and if-statement for this problem. Do not use existing codes. Use your own codes). DO NOT USE ANY KINDS OF SORT FUNCTIONS. For example, in given list [10,36,58,31,56,77,43, 12,65,19], if n is defined as 2. The program will print 56. Q7. We are interested in obtaining the positive integer numbers which follow the following rule. The number is equal to the sum of its positive divisors, except the itself. For example, 28 has divisors 1, 2, 4, 7 and 14 (exclude 28), and 1 + 2 + 4+7+14 -28, so 28 fits our definition. Ask a user to enter a number and check this number fits to our definition. Q8: Import the data from following webpage to your R . https://raw.github.com/sebastiansauer/Daten_Unterricht/master/Affairs.csv You obtain the data in different ways, such as 1) Go to the webpage and save the data to your computer, but this takes time @ 2) You can directly read from the webpage. library(readr) library(knitr) DATA