-
Notifications
You must be signed in to change notification settings - Fork 51
code review #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
code review #66
Conversation
egorkravchenko13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewer Egor Kravchenko
KornienkoT/first/task1.py
Outdated
| @@ -0,0 +1,2 @@ | |||
| lis = [1, 4 ,7 ,"f", [], [], []] | |||
| print (lis.count([])) No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""
Порахувати кількість порожніх списків у заданому списку
"""
def task2(lis):
result = lis.count([])
return result
Everything is ok
But, without name task
| @@ -0,0 +1,10 @@ | |||
| sentence = input() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can improve input("Write text: ")
KornienkoT/first/task2.py
Outdated
| for word in CapLetters: | ||
| for symb in word: | ||
| if (symb.isupper()): | ||
| print (word) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""
Вивести слова, які мястять хоча б одну велику букву
"""
def task2(capletters):
for word in capletters:
for symb in word:
if (symb.isupper()):
return word
print(task2(CapLetters))
Everything is ok
But, without name task
| @@ -0,0 +1,14 @@ | |||
| lis = ["h","t", 3, 7, 9, {}] | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def task3(lis):
number = []
string = []
for i in lis:
elem = type(i)
if (elem == float or elem == int):
number.append(i)
elif (elem == str):
string.append(i)
print ( sum (number))
print (task3(lis))
KornienkoT/first/task3.py
Outdated
| elif (elem == str): | ||
| string.append(i) | ||
|
|
||
| print ( sum (number)) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is ok
But, without name task
No description provided.