-
Notifications
You must be signed in to change notification settings - Fork 51
ready_to_review #47
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?
ready_to_review #47
Conversation
| Вивести кількість цілих чисел у списку | ||
|
|
||
| """ | ||
|
|
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.
Зайві відступи у коді
| my_list = ['qwert', 'abc', 3, 4.09, 7, 10, 'rtt'] | ||
| counter = 0 | ||
| for el in my_list: | ||
| if isinstance(int) == int: |
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.
Невірна умова, потрібно написати: if isinstance(el, int):
| """ | ||
| Вивести слова в нижньому регістрі | ||
|
|
||
| """ 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.
`
start_str = "Abcde aksd askd ASodk wasD LMZGL 123123"
temp_list = start_str.split()
[print(element) for element in temp_list if element.islower()]
`
| """ | ||
| Знайти середне значення чисел у заданому користувачем діапазоні | ||
|
|
||
| """ 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.
`first_num, second_num = int(input("Введіть початковый елемент:")), int(input("Введіть кінцевий елемент:"))
sum, counter = 0, 0
for i in range(first_num, second_num+1):
sum += i
counter += 1
print(sum/counter)
`
|
|
||
| """ | ||
|
|
||
|
|
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 val_numb(): | ||
| while not if_numb(): | ||
| print("input number") | ||
| number = val_numb() 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.
`
import re
def is_num(text):
return bool(re.match(r'^[1-30]?\d{1,3}$',text))
def num_validator(user_str=""):
temp_str = input(user_str)
while not is_num(temp_str):
temp_str = input(user_str)
return int(temp_str)
def to_Roman(num):
result = ''
for arabic, roman in zip((1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1),'M CM D CD C XC L XL X IX V IV I'.split()):
result += num // arabic * roman
num %= arabic
return result
user_num = num_validator("Введіть число до 4000: ")
print(to_Roman(user_num))
`
No description provided.