Skip to content

Conversation

@tansa25
Copy link

@tansa25 tansa25 commented Dec 23, 2019

No description provided.

Copy link

@egorkravchenko13 egorkravchenko13 left a comment

Choose a reason for hiding this comment

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

reviewer Egor Kravchenko

@@ -0,0 +1,2 @@
lis = [1, 4 ,7 ,"f", [], [], []]
print (lis.count([])) No newline at end of file

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()

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: ")

for word in CapLetters:
for symb in word:
if (symb.isupper()):
print (word) No newline at end of file

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, {}]

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))

elif (elem == str):
string.append(i)

print ( sum (number)) No newline at end of file

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants