Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions noskovik/first/task1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""

"""

my_list = str(input())
my_list = my_list.split()
print(my_list)
for element in my_list:
if type(element)==type(float):
print(element)
12 changes: 12 additions & 0 deletions noskovik/first/task2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Зробити у всіх словах першу букву великою.
"""

text = str(input())
text=text.split()
for elements in text:
try:
if elements == elements.isupper:
print(elements)
except:
print()
1 change: 1 addition & 0 deletions noskovik/first/task3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty
17 changes: 17 additions & 0 deletions noskovik/second/task1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Знайти мінімальне слово за кількістю букв.
"""

import re


text=input()
def find_text(text):

a = re.findall('\w*[A-Za-z]', text)
for element in a:
min(b) = int(len(element))

return print(min)

find_text(text)
Comment on lines +1 to +17

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't work. This program should be written like this (in two strings):
'''
import re
print(min((x for x in re.findall(r'\w*[A-Za-z]', input())),key=len))
'''
There are wrong names of variables and syntaxes.
For example, name 'a' can be named as min_text, variable 'b' is not found in code, function min() is used incorrectly.
You need to make spaces before and after '=' for more readability.