Skip to content

Commit 1a9d3bc

Browse files
author
Alexey Chernykh
committed
fixed for_challenges.py, string_challenges.py
1 parent d7696ae commit 1a9d3bc

File tree

2 files changed

+3
-62
lines changed

2 files changed

+3
-62
lines changed

for_challenges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ def gender(male_female):
6363
]
6464

6565
for group, names in enumerate(groups, start=1):
66-
print(f'Группа {group}: {", ".join(groups[names])}')
66+
print(f'Группа {group}: {", ".join(groups[names])}')

string_challenges.py

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
# Вывести первую букву каждого слова на отдельной строке
2626
sentence = 'Мы приехали в гости'
27-
for letter in sentence.split():
28-
print(letter[0])
27+
for word in sentence.split():
28+
print(word[0])
2929

3030
# Вывести усреднённую длину слова в предложении
3131
sentence = 'Мы приехали в гости'
@@ -34,62 +34,3 @@
3434
len_word += len(word)
3535
avg_len_word = len_word / len(sentence.split())
3636
print(avg_len_word)
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-
91-
92-
93-
94-
95-

0 commit comments

Comments
 (0)