Reference no: EM131405754
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]
Which currency is used the most in international invoices
: MGT 520- Which currency is used the most in international invoices? On what unit of analysis did the first theories of international trade focus? The first theories of international trade are referred to as _____.
|
Determining the messaging servers
: You were hired as a Consultant for a Medium size organization. They operate a Microsoft Exchange Messaging Server. They have 5 functional departments. Among them are Sales and Accounts Receivables.
|
Discuss the organizations culture and its climate
: Describe how these are evidenced-or perhaps appear to be contradicted-in the words and actions of leaders and others in the organization, noting relevant data or artifacts. In addition, discuss the organization's culture and its climate, different..
|
How each leadership style might affect the performance
: Analyze how each leadership style might affect the respective company's performance and alignment to values. Discuss which leadership style to which you are most aligned.
|
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:
|
Are jesus-views on wealth practical and helpful
: Jesus often spoke critically about material possessions and the wealth. He even directed one person to give away all his wealth to the poor before following him. Are Jesus/ views on wealth practical and helpful or impractical and potentially harmf..
|
Do you exhibit the right company culture every day
: Think of your own actions at work. Do you exhibit the right company culture every day? In other words, do you walk the walk and talk the talk?
|
Information and prints a payroll statement
: Write a program with Python that reads the following information and prints a payroll statement:
|
Displays the future investment value
: Write a program in Python that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula:
|