Posts of Точка входа в программирование

newest first

#5239Text
Views315−37%vs avg
Forwards1
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
9 h285
15 h315
  1. Total to date315
#5238Text
Views382−24%vs avg
Forwards1
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
11 h359
17 h382
  1. After 24 hours382
  2. Total to date382
#5237Photo
Views485−3%vs avg
Forwards4
Reactions2
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
9 h310
33 h476
39 h485
  1. Total to date485
#5236Photo
Views471−6%vs avg
Forwards2
Reactions3
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
11 h344
35 h463
41 h471
  1. Total to date471
#5235Photo
Views494−1%vs avg
Forwards2
Reactions3
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
8 h273
32 h436
63 h493
69 h494
  1. Total to date494
#5234Photo
Views446−11%vs avg
Forwards2
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
11 h294
35 h413
65 h446
71 h446
  1. Total to date446
#5233Video
Views457−9%vs avg
Forwards1
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
8 h228
20 h284
68 h457
  1. After 6 hours228
  2. After 24 hours284
  3. Total to date457
#5232Photo
Views448−11%vs avg
Forwards2
Reactions2
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
11 h263
23 h310
71 h448
  1. After 24 hours310
  2. Total to date448
#5231Photo
Views491−2%vs avg
Forwards2
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
8 h303
32 h431
44 h449
68 h491
  1. After 6 hours303
  2. After 24 hours431
  3. Total to date491
#5230Photo
Views5030%vs avg
Forwards2
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
10 h371
34 h459
46 h477
70 h503
  1. Total to date503
#5229Photo
Views508+1%vs avg
Forwards1
Reactions2
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
9 h305
32 h454
68 h508
  1. After 24 hours454
  2. Total to date508
#5228Photo
Views476−5%vs avg
Forwards1
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
11 h330
34 h435
70 h476
  1. Total to date476
#5227Photo
Views491−2%vs avg
Forwards3
Reactions2
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
9 h296
33 h425
68 h491
  1. Total to date491
#5226Photo
Views467−7%vs avg
Forwards2
Reactions3
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
2 h179
11 h332
35 h421
70 h467
  1. Total to date467
#5225Photo
Views511+2%vs avg
Forwards4
Reactions5
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
2 h224
8 h320
33 h469
67 h511
  1. After 1 hour224
  2. After 6 hours320
  3. Total to date511
#5224Photo
Views506+1%vs avg
Forwards3
Reactions6
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
4 h294
10 h356
26 h429
69 h506
  1. After 24 hours429
  2. Total to date506
#5223Text
Views522+4%vs avg
Forwards2
Reactions4
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
4 h260
14 h345
26 h448
32 h469
69 h522
  1. After 6 hours260
  2. After 24 hours448
  3. Total to date522
#5222Text
Views529+6%vs avg
Forwards0
Reactions4
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
6 h354
28 h474
34 h491
71 h529
  1. After 6 hours354
  2. After 24 hours474
  3. Total to date529
#5221Text
Views515+3%vs avg
Forwards1
Reactions4
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
6 h198
16 h270
28 h431
56 h495
72 h515
  1. After 6 hours198
  2. After 24 hours431
  3. Total to date515
#5220Text
Views488−3%vs avg
Forwards1
Reactions4
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
8 h250
31 h425
58 h472
74 h488
  1. After 6 hours250
  2. After 24 hours425
  3. Total to date488
#5219Text
Views478−5%vs avg
Forwards1
Reactions6
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
3 h158
9 h227
30 h359
74 h478
  1. After 24 hours359
  2. Total to date478
#5218Text
Views470−6%vs avg
Forwards0
Reactions6
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
5 h225
11 h276
32 h365
76 h470
  1. After 6 hours225
  2. After 24 hours365
  3. Total to date470
#5217Photo
Views491−2%vs avg
Forwards1
Reactions6
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
24 h419
74 h491
  1. After 24 hours419
  2. Total to date491
#5216Photo
Views448−11%vs avg
Forwards1
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
27 h395
76 h448
  1. After 24 hours395
  2. Total to date448
#5215Photo
Views442−12%vs avg
Forwards1
Reactions4
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
29 h413
66 h442
  1. After 24 hours413
  2. Total to date442
#5214Photo
Views526+5%vs avg
Forwards3
Reactions1
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
48 h506
75 h526
  1. Total to date526
#5213Photo
Views506+1%vs avg
Forwards2
Reactions3
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
51 h480
77 h506
  1. Total to date506
#5212Photo
Views466−7%vs avg
Forwards2
Reactions3
Comments0
Views growthHide views growth

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
53 h462
68 h466
  1. Total to date466
#5211Photo

Чистая функция вычисляет результат без изменения внешних данных Функция получает сумму и скидку, возвращает новую сумму. Ей не нужно читать глобальную переменную или менять переданный объект: def discounted(total, percent): return total * (100 - percent) // 100 print(discounted(1000, 10)) # 900 Здесь суммы заданы целыми единицами, а результат округляется вниз. Это правило конкретного примера, а не универсальный способ расчёта денег. Функцию называют чистой, если результат зависит только от аргументов и вызов не создаёт наблюдаемых побочных эффектов: например, не меняет внешний список и не записывает файл. Такую функцию проще проверить: передали 1000 и 10 — ожидаем 900. Чтобы проверить вычисление, не приходится готовить базу или очищать глобальное состояние. В руководстве по функциональному подходу разбираются и другие приёмы. Начать можно с отделения вычислений от ввода, вывода и изменения данных.

Open in Telegram
Views531+6%vs avg
Forwards3
Reactions2
Comments0
#5210Photo
Views521+4%vs avg
Forwards2
Reactions1
Comments0