updates lecture files

This commit is contained in:
Pamela Hathway 2025-09-23 13:19:04 +03:00
parent 6c782bdf30
commit 952f8b97a5
6 changed files with 10 additions and 154 deletions

View file

@ -1,19 +1,6 @@
from first import times_3
def test_times_3_integer():
value = 7
expected = 21
result = times_3(value)
assert result == expected
pass
def test_times_3_string():
value = 'wow'
expected = 'wowwowwow'
result = times_3(value)
assert result == expected
pass

View file

@ -1,13 +1,6 @@
def times_3(x):
""" Multiply x by 3.
Parameters
----------
x : The item to multiply by 3.
"""
return x * 3
pass
if __name__ == '__main__':
print(times_3(2))
print(times_3("a"))
if __name__ == "__main__":
pass

View file

@ -8,3 +8,8 @@ def find_maxima(x):
idx -- list of indices of the local maxima in x
"""
return []
if __name__ == "__main__":
x = [1, 2, 3]
print(find_maxima(x))

View file

@ -1,6 +1,3 @@
import numpy as np
import pytest
from local_maxima import find_maxima