ответвлено от main/python-labs
added otstupi
Этот коммит содержится в:
@@ -20,19 +20,23 @@
|
||||
import cmath
|
||||
divmod(round(cmath.phase(0.2+0.8j),2)*20,3)
|
||||
(8.0, 2.6000000000000014)
|
||||
|
||||
# Punkt 2
|
||||
import time
|
||||
localTime = time.localtime()
|
||||
print("Current time: {}:{}".format(localTime.tm_hour, localTime.tm_min))
|
||||
Current time: 15:31
|
||||
|
||||
# Punkt 3
|
||||
import random
|
||||
Days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
|
||||
random.sample(Days, 3)
|
||||
['Friday', 'Saturday', 'Wednesday']
|
||||
|
||||
# Punkt 4
|
||||
random.choice(range(14, 33, 3))
|
||||
17
|
||||
|
||||
# Punkt 5
|
||||
import math
|
||||
N = math.floor(random.gauss(15, 4))
|
||||
@@ -43,6 +47,7 @@ import string
|
||||
letters = random.sample(string.ascii_letters, N)
|
||||
letters
|
||||
['w', 'S', 'v', 'W', 'z', 'F', 'R', 'e', 'u', 'B', 'l', 'X', 'A', 'y']
|
||||
|
||||
# Punkt 6
|
||||
timeDiff = round(time.time() - time.mktime(localTime))
|
||||
print(timeDiff // 60, "minutes and", timeDiff % 60, "seconds")
|
||||
|
||||
Ссылка в новой задаче
Block a user