Skip to content

Conversation

@Alinagermanchuk
Copy link

No description provided.

Copy link

@AndyLanYT AndyLanYT left a comment

Choose a reason for hiding this comment

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

Знайдена єдина помилка пов'язана із табуляцією в третьому завданні.

elif isinstance(list[i],str):
string += list[i]
print(sum)
print(string) 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 function(list):
    sum = 0
    string=str()
    for i in range(0,len(list)):
        if isinstance(list[i], int):
            sum +=int(list[i])

        elif isinstance(list[i],str):
            string += list[i]
    print(sum)
    print(string)

Єдина помилка пов'язана із табуляцією (рядочок №12)
Так, код працює

for item in string.split():
if any(c.isupper() for c in item):
result.append(item)
print(result) 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 uppercase(string):
    result = []
    for item in string.split():
        if any(c.isupper() for c in item):
            result.append(item)
    return result

Помилки відсутні


list = [1,[],6,3,87,'абв',[]]
empty = list.count([])
print(empty) 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 counter(list):
    result = list.count([])
    return result

Помилки відсутні

Copy link

@AndyLanYT AndyLanYT left a comment

Choose a reason for hiding this comment

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

Завдання і опис до другої контрольної роботи відсутні!!!

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.

2 participants