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

  An overview of wireless lan security - term paper

Computer Science or Information Technology deals with Wireless LAN Security. Wireless LAN Security is gaining importance in the recent times. This report talks about how vulnerable are wireless LAN networks without any security measures and also talk..

  Computer networks and security against hackers

This case study about a company named Magna International, a Canada based global supplier of automotive components, modules and systems. Along with the company analysis have been made in this assignment.

  New attack models

The Internet evolution is and is very fast and the Internet exposes the connected computers to attacks and the subsequent losses are in rise.

  Islamic Calligraphy

Islamic calligraphy or Arabic calligraphy is a primary form of art for Islamic visual expression and creativity.

  A comprehensive study about web-based email implementation

Conduct a comprehensive study about web-based email implementation in gmail. Optionally, you may use sniffer like wireshark or your choice to analyze the communication traffic.

  Retention policy and litigation hold notices

The purpose of this project is to provide you with an opportunity to create a document retention policy. You will also learn how to serve a litigation hold notice for an educational institute.

  Tools to enhance password protection

A report on Tools to enhance Password Protection.

  Analyse security procedures

Analyse security procedures

  Write a report on denial of service

Write a report on DENIAL OF SERVICE (DoS).

  Phising email

Phising email It is multipart, what are the two parts? The HTML part, is it inviting the recepient to click somewhere? What is the email proporting to do when the link is clicked?

  Express the shannon-hartley capacity theorem

Express the Shannon-Hartley capacity theorem in terms of where is the Energy/bit and is the psd of white noise.

  Modern symmetric encryption schemes

Pseudo-random generators, pseudo-random functions and pseudo-random permutations

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