-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunk.py
49 lines (48 loc) · 1.63 KB
/
funk.py
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
import os
import selenium
import time
import datetime
# random modulu
import random
"""for i in range(10):
print(random.random()) # 0-1 arasi 10 reqemi ekrana cixaracaq
for i in range(10):
print(random.uniform(1.2,10.3)) #1.2-10.3 arasi float ededleri ekrana cixarir
for i in range(10):
print(random.randint(2,15)) # 1-16 arasi tam ededleri ekrana cixarir
for i in range(10):
print(random.randrange(2,10,2)) # 2-10 arasi ededleri 2 addimla secir
liste=[3,4,7,8,9,15]
print(random.choice(liste)) # list-den random secir
liste1=["Windows","Linux","Android"]
print(random.choice(liste1))
l=random.shuffle(liste) # list-in elementlerini qarisdirir
print(liste)
print(random.sample(liste,4)) # 4 elementi random secir
# Time modulu
import time
print(time.time()) # strainger time
print(time.ctime()) # now time
print(time.localtime()) # yerli time
print(time.asctime(time.localtime())) # now time
print(time.strftime("12/12/2022")) # str-i ekrana cixarir
print("ishe basladi")
time.sleep(3) # 3 saniye sonra ekrana cixarir
print("ishi qurtardi")
zarlar={1:0,2:2,3:4,4:6,5:8,6:10}
for i in range(100):
zar= random.randint(1,6)
zarlar[zar]+=1 # zarin dusme ehtimali
for zar in zarlar:
print(f"{zar} gelme ehtimali: {zarlar[zar]}")"""
"""alti_alti=0
check=0
while True:
check+=1
zar1=random.randint(1,6)
zar2=random.randint(1,6) #6-6 10 defe dusmesi ucun yoxlama sayi
if zar1==6 and zar2==6:
alti_alti+=1
if alti_alti==10:
print(f"10 defe 6-6 cixmasi ucun {check} qeder yoxlama edib!")
break"""