Exemplo n.º 1
0
''' 
...................................................
CP164 - Data Structures 

Author: Laith Adi 

ID: 170265190    

Email: [email protected]

Updated: 2019-01-17 
...................................................
'''

from functions import max_diff

#defining the list
a = [-5, 5, 7, 11]

print(max_diff(a))
Exemplo n.º 2
0
def main():
    print(max_diff([0, 0, 0, 0]))
Exemplo n.º 3
0
"""
------------------------------------------------------------------------
Assignment 1, Task 5 - Max Diff
------------------------------------------------------------------------
Author: Nicolas Mills
ID:     180856100
Email:  [email protected]
__updated__ = 2019-01-14
------------------------------------------------------------------------
"""
from functions import max_diff

values = [1, 4, 100, -3]

md = max_diff(values)

print("Values: {}".format(values))
print("Max diff: {}".format(md))
Exemplo n.º 4
0
"""
-------------------------------------------------------
[program description]
-------------------------------------------------------
Author:  Anshul Khatri
ID:      193313680
Email:   [email protected]
__updated__ = "2020-01-16"
-------------------------------------------------------
"""

from functions import max_diff

a = []
lent = int(input('Please enter the number of numbers you want to enter'))
for i in range(lent):
    number_s = int(input('Please Enter the number'))
    a.append(number_s)
print("{}".format(max_diff(a)))