Reference no: EM131406484
Part 1: Generate a list of Random Numbers
Write a program in Python that generates 20 random numbers and stores them in a list. The program should store the numbers in an array. Use the list using the built-in functionality of the print functions. Your output should look like this:
[22, 47, 71, 25, 28, 61, 79, 57, 89, 3, 29, 41, 99, 86, 75, 98, 4, 31, 22, 33]
Next, write a function that has the list as a parameter, and displays these statistics. Use the built-in min, max, sum, and len functions.
- The lowest number
- The highest number
- The sum of the numbers
The output should look similar to this:
Highest: 89
Lowest: 3
Sum: 482
Average: 48.2
Part 2: Prime Numbers List
For each number in your list, test to see if it is prime using the is_prime() function you wrote in the Prime Numbers lab. If the number is prime, add it to a new list and delete it from the original list. You'll end up with two lists: one with prime numbers and one with non-primes. Put a test in your code to sum the length of the two lists to be sure there are still 20 numbers in total. Now sort both lists with the built-in sort() function, then print them out. Your output should be similar to this:
Primes: [47, 71, 61, 79, 57, 89, 3, 29, 41, 31]
Non-primes: [22, 25, 28, 99, 86, 75, 98, 4, 22, 33]
Research paper on computer programming
: Research Paper on computer programming, different coding languages and their impact on the Technology field.
|
Options for improving the security
: A firm is considering two options for improving the security of its employee accounts from remote compromise. The firm calculates that the probability of compromise without enacting any additional security measures is 0.5, and that successful atta..
|
Why does it provide a relatively poor hedge
: Explain how a stop-loss hedging scheme can be implemented for the miter of an out-of-the-money call option. Why does it provide a relatively poor hedge?
|
Discuss the overview of network security fundamentals
: They provide you with the following report outline to use: Introduction and Overview of network security fundamentals, security threats, and issues (discuss from a companywide standpoint)
|
Generate a list of random numbers
: Write a program in Python that generates 20 random numbers and stores them in a list. The program should store the numbers in an array. Use the list using the built-in functionality of the print functions. Your output should look like this:
|
What is the 5-day 99% value at risk for the portfolio
: Consider a position consisting of a 8100,000 investment in asset A and a 5100.000 investment in asset B. Assume that the daily volatilities of both assets arc I% and that the coefficient of correlation between their returns is 0.3. What is the 5-d..
|
Information and prints a payroll statement
: Write a program with Python that reads the following information and prints a payroll statement:
|
What is the 5-day 95% value at risk for the portfolio
: Assume that the daily volatilities of the assets are 1.8% and 1.2%, respectively, and that the coefficient of correlation between their returns is 0.3. What is the 5-day 95% value at risk for the portfolio?
|
What kinds of sources do you plan to use for research
: What kinds of sources (for example, company website, annual report, government websites, and library articles) do you plan to use for research?
|