-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalc.py
More file actions
69 lines (53 loc) · 1.69 KB
/
calc.py
File metadata and controls
69 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This file provides a simple command-line calculator,
# with implementations of important mathematical functionalities.
#
# The implementors must fill the empty functions (all of them!)
# with the right code. Also, there are some functions specified only in comments,
# without their declarations, so one should declare
# and implement them.
#
# All functions must be properly documented.
#
# CS UFRN 2018
###################################################################################
def display_calculator():
''' Interact with the user, showing a command-line menu and
receiving input for operations and operands. '''
pass
def mean(values):
pass
def median(values):
pass
# mode
#
# Takes a list and computes the mode value.
# standard_deviation
#
# Takes a list and computes the standard deviation of its values.
# n_max_numbers
#
# Takes an integer N and a list L, and computes the N maximum numbers in L.
# n_min_numbers
#
# Takes an integer N and a list L, and computes the N minimum numbers in L.
# sum_n_max_numbers
#
# Takes an integer N and a list L, and computes the sum of the N maximum numbers in L.
# sum_n_min_numbers
#
# Takes an integer N and a list L, and computes the sum of the N minimum numbers in L.
def validate_matrix(lists):
pass
def sum_matrices(matrix1, matrix2):
pass
def multiply_matrices(matrix1, matrix2):
pass
# exp_approx
#
# Takes a value X and a float E, and computes an approximation for e^X with maximum error E.
# sin_approx
#
# Takes a value X and a float E, and computes an approximation for sin(X) with maximum error E.
# cos_approx
#
# Takes a value X and a float E, and computes an approximation for cos(X) with maximum error E.