-
Notifications
You must be signed in to change notification settings - Fork 50
1-2 кр #61
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?
1-2 кр #61
Conversation
AndyLanYT
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.
Знайдена єдина помилка пов'язана із табуляцією в третьому завданні.
| elif isinstance(list[i],str): | ||
| string += list[i] | ||
| print(sum) | ||
| print(string) 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 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 |
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 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 |
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 counter(list):
result = list.count([])
return resultПомилки відсутні
AndyLanYT
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.
Завдання і опис до другої контрольної роботи відсутні!!!
No description provided.