Write a function with the name scoretoletter

Assignment Help Computer Network Security
Reference no: EM132083347

You are new to python, and i used python 3.

A) Write a function with the name scoreToLetter. The function should take an integer parameter and give out a letter grade according to the following grade table:

Score >=90

A

80<=score<90

B

70<=score< 80

C

Test the function with the following code:

X = 85

Print ("Your grade is",scoreToLetter(x))

This should print:

Your grade is B

B) Write a function 'sumOfThrows' that takes two parameters 'throws' and 'sides'. 'sides' should have a default values of 6. The function should return the sum from doing however many random throws specified for a die with 'sides' number of sides.

Test the function.

For example sumOfThrows(1,6) should show the outcome of throwing one six-sided die.

sumOfThrows(3,8) should show the outcome of throwing three dice with sides numbered 1 through 8.

sumOfThrows(2) should show the outcome of throwing two six-sided dice.

D) Move all functions to a module with name myFunctions.py. Import the myFunctions module and test all functions.

E) Submit both myFunction.py and the file with your tests named tests.py

Reference no: EM132083347

Questions Cloud

Draft a one-page response in the form of a business memo : Draft a one-page response in the form of a business memo to your manager discussing your recommendation on the President's suggestion to recognize the $120,000
How long should the company guarantee the batteries : Long Life Battery Company makes car batteries. After years of product testing, the company knows their batteries follow a normal distribution
Compute the amount clydesdale : Compute the amount Clydesdale should report as a deferred tax liability at December 31, 2014 - Deferred tax liability at December 31, 2014
What advice do you have for the project manager : How likely does it seem that Pete will achieve his desired goals of being on time and within budget if nothing is done?
Write a function with the name scoretoletter : Write a function 'sumOfThrows' that takes two parameters 'throws' and 'sides'. 'sides' should have a default values of 6.
Row and column marginal totals : A chi-square test of homogeneity (independence) of counts in a contingency table tests whether counts are consistent(proportional) with the row and column.
Calculate the restated cash dividend per share : For several years Orbon, Inc., has followed a policy of paying a cash dividend of $0.57 per share, Calculate the restated cash dividend per share for 2012
What would be the test statistic for the test : If the p-value for the test were 0.119, what would be the test statistic for the test?
How would you do such a thing in sml : A pangram is a sentence that contains at least one of every letter of the alphabet.

Reviews

Write a Review

Computer Network Security Questions & Answers

  Discusses methods for systems and application security

Write a 1-2 -paragraph summary that discusses methods for systems and application security. Use the completed Pluralsight lesson as your source including key points taken from the lesson.

  Explain rsa public-key encryption scheme

Consider the plain (i.e., non-padded) RSA public-key encryption scheme. Encrypt the message m = 12 using the public key pk = (N,e), where N = 35 and e = 3.

  Identify the responsibilities of a project manager

Identify the responsibilities of a Project manager when participating in a real world project and define the role of management in projects, particularly from the view point of the practitioner as a member of the project team;

  What kind of malicious attack

In this assignment, you will research and select one well-known virus or a malicious code attack. Then, write a one-page essay explaining the following questions

  Comprehensive analysis of the business needs

Identify network security measures needed and providing detailed information about them. Network security measures should also include preventative and maintenance measures.

  Does the resulting scheme satisfy perfect secrecy

Consider the one time pad encryption scheme to encrypt a 1-bit message m with a 1-bit key k. Replace the XOR operation with another operation X. For which X(m,k) does the resulting scheme satisfy perfect secrecy?

  Discuss the hash functions and message authentication

Stallings states, "...perhaps the most versatile cryptographic algorithm is the cryptographic hash function."

  Cryptosystem

Block cipher, Primitive root, Confusion, Diffusion, Digital signature, Conventional Symmetric-Key Encryption

  Give the security levels top secret-secret and confidential

Give the security levels Top SECRET,SECRET,CONFIDENTIAL, and UNCLASSIFIED (order from highest to lowest), and catergories A, B,C, specify what type of access (read,write, both or neither) is allowed in each of the following situations .

  Financial organization managing routine administrative

An organization managing public information on its Web server and a law enforcement organization managing extremely sensitive investigative information.

  Define the vulnerability assessment requirement

Define the vulnerability assessment requirement, propose a solution, and justify the solution. Define the risk management requirement, propose a solution.

  The designers of s-aes got the ciphertext

Use the key 1010 0111 0011 1011 to encrypt the plaintext "ok" as expressed in ASCIIas 0110 1111 0110 1011. The designers of S-AES got the ciphertext 0000 0111 00111000. Do you?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd