-
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| lis = [1, 4 ,7 ,"f", [], [], []] | ||
| print (lis.count([])) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| sentence = input() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can improve input("Write text: ") |
||
| print (sentence) | ||
|
|
||
| CapLetters = sentence.split(" ") | ||
| print (CapLetters) | ||
|
|
||
| for word in CapLetters: | ||
| for symb in word: | ||
| if (symb.isupper()): | ||
| print (word) | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| lis = ["h","t", 3, 7, 9, {}] | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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)) | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| """ | ||
| Використовуючи регулярні вирази, для поданого нижче тексту | ||
| замініть кожне входження автомобільного | ||
| номеру у форматі `АА 0000 BB` на текст `[номер АА]`. Виведіть результат. | ||
| """ | ||
| import re | ||
|
|
||
| print("Завдання 5") | ||
|
|
||
| f1 = input("Введіть перші два елементи: ") | ||
| f2 = input("vvedite chisla: ") | ||
| f3 = input("Введіть перші два елементи: ") | ||
| stroka = (f1+f2+f3) | ||
| print(stroka) | ||
| print(re.compile((re.findall((r'\w{2}\s\d{4}\w{2}',"AA 0000 BB"))),'[nomer AA]')) |
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