-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnumfunc.py
More file actions
130 lines (62 loc) · 1.15 KB
/
Copy pathnumfunc.py
File metadata and controls
130 lines (62 loc) · 1.15 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# function syntax
# output = function(input)
# 1. converts negative to positive num
# var = -40
# res = abs(var)
# print(res)
# 2. gets the max and min value
# nums = [10,20,30,40,50,60,60,-30]
# res = max(nums)
# print(res)
#
#
#
# res = max(10,20,30,40,50,60,100,60,-30)
# print(res)
# res = min(10,20,30,40,50,60,60,-30)
# print(res)
# 4. rounds to the upper and lower value
import math
# var = 10.3
# res = math.ceil(var)
# print(res)
#
#
# res = math.floor(var)
# print(res)
#
# res = math.ceil(10.0001)
# print(res)
# res = math.log(var)
# res = math.log10(var)
# res = math.modf(var)
# res = math.exp(var)
# res = math.sqrt(var)
# res = math.tan(var)
# res = math.sec(var)
# res = math.radians(var)
# print(res)
# print(dir(math))
# print(help(math))
# import os
# print(dir(os))
# print(help(os))
# var = 3.323232233
# res = round(var,3)
# print(res)
import random
# ltn = [1111,1112,1113,1114,1115,1116]
# res = random.shuffle(ltn)
# print(res)
# print(ltn)
#
#
# res = random.shuffle(ltn)
# print(ltn)
#
#
#
# res = random.choice(ltn)
# print(res)
# res = random.randrange(100000,999999)
# print(res)