Giter Site home page Giter Site logo

david_qs's Introduction

David_Qs

The object grades contains the test grades of students for 5 different tests.

  • Keys: Student Name

  • Values: Array Containing 5 Test Grades

grades = {
    'Ed'    : [64, 73, 64, 24, 49],
    'Daniel': [37, 73, 53, 95, 88],
    'Dennis': [86, 97, 23, 66, 21],
    'George': [96, 53, 75, 84, 96]
}

1

Write a function get_average(scores) that takes in one argument scores, which is an array of integers and return the average.

Example

Input

get_average([1,2,3,4,5])

Output

3

2

Write a function get_averages() that takes no arguments and prints out the name of each student followed by their test average.

Example

Input

get_averages()

Output

Ed 54.8
Daniel 69.2
Dennis 58.6
George 80.8

3

Write a function get_highest_score(test_num) that takes in one argument test_num, which prints the name of the student who achieved the highest test grade on the test given by the test_num argument.

Examples

Input

get_highest_score(1)

Output

George 96

Input

get_highest_score(2)

Output

Dennis 97

4

Write a function get_letter_grade(score) that takes in one argument score, which returns letter grade equivalent of a test score.

Grade Letter
90 - 100 A
80 - 89.99 B
70 - 79.99 C
60 - 69.99 D
Below 60 F

Examples

Input

get_highest_score(100)

Output

A

Input

get_letter_grade(65)

Output

D

5

Write a function get_letter_grades(scores) that takes in one argument scores, which returns an array of letter grades as strings.

Grade Letter
90 - 100 A
80 - 89.99 B
70 - 79.99 C
60 - 69.99 D
Below 60 F

Example

Input

get_letter_grades([37, 73, 53, 95, 88])

Output

['F', 'C', 'F', 'A', 'B']

6

Write a function tests_summary(tests) that takes in one argument tests, which prints the test number and the test score shown in the example below.

Example

Input

tests_summary([37, 73, 53, 95, 88])

Output

Test 1 : 37
Test 2 : 73
Test 3 : 53
Test 4 : 95
Test 5 : 88

david_qs's People

Contributors

jng985 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.