Reference no: EM132356738
USING PYTHON
Exercise 1: Dice probability distribution simulation
Function name:
sim_dice
Parameters:
None
Return:
A dictionary with six elements: keys are integers 1 to 6, values are corresponding number of occurrences.
Description:
You roll the dice 10,000 times. Each time you get one of six sides with a probability of 1/6. You need to generate the total number of occurrences for each side, store them in a dictionary as a returned value.
Hint:
1. This rolling is equal to choosing a number in [0,1), while dividing it into six sections: [0, 1/6), [1/6, 2/6), [2/6, 3/6), [3/6, 4/6), [4/6, 5/6), [5/6, 1)
2. You need to use random() to randomly generate a floating number between 0 and 1.
Exercise 2: Sentence comparison
Function name:
sent_compare
Parameters:
sentence 1, sentence 2
Return:
An integer: the number of common unique characters in two sentences
Description:
You receive two sentences as inputs from the keyboard and compare them. Your function should be able to output the number of common unique characters in two sentences. For example, sentence 1: "I like Python programming", sentence 2: "I like java", then the output is: 6.
(They are: i, l, k, e, a, and space.) It should be case insensitive. To convert a string 's' to a lowercase string, use s.lower().
Discuss the principle of least privilege
: Read five articles and discuss the principle of least privilege in at least 500 words. Explain how this principle impacts data security. Include at least one.
|
Write a program that keeps reading an exam score entered
: Write a program that keeps reading an exam score until a -1 is entered. The program will output the letter grade according to the table below.
|
Segmentation for a company and the relative merits
: Other than new users, returning users, paid search traffic, nonpaid search traffic, direct traffic, referral source, landing page, browser, and mobile traffic
|
Demonstrate the application of theory to workplace
: Reflect on the connection between knowledge or concepts from these courses and how those have been, or could be, applied in the work place (200-250 words per).
|
Generate the total number of occurrences for each side
: You roll the dice 10,000 times. Each time you get one of six sides with a probability of 1/6. You need to generate the total number of occurrences.
|
Applied in particular field of study or work environment
: How can the results and conclusions presented in this study be applied in your particular field of study or work environment?
|
Explain the innovation and technologies policy issues
: Write a research paper that explains the innovation and technologies policy issues and its impacts on people in a global environment.
|
Write a file that plays a simple guessing game with you
: Write a file that plays a simple guessing game with you. The computer will pick a number between 1 and 100, then give you a given number of guesses.
|
Determining the competitive value of information technology
: Please respond to the following: Identify three factors to consider in determining the competitive value of information technology. Justify the selected factor.
|