cos in python in degrees
math.cos(math.radians(1))
# math.cos takes radians
# math.radians converts radians to degrees
cos in python in degrees
math.cos(math.radians(1))
# math.cos takes radians
# math.radians converts radians to degrees
python floor
import math
x = 3.86356
math.floor(x)
#Returns: 3
math.ceil(x)
#Returns: 4
find sin python3
import fnmatch
import os
from typing import List
def find_files(pattern, path) -> List[str]:
"""Takes a shell pattern and a path and returns a list of file path strings"""
result: List[str] = []
for root, dirs, files in os.walk(path):
for name in files:
if fnmatch.fnmatch(name, pattern):
result.append(os.path.join(root, name))
return result
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us