-
Notifications
You must be signed in to change notification settings - Fork 51
ready_to_review #58
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 #58
Changes from all 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,8 @@ | ||
| new_list = [1,2,4,5.1,5.5,6,7.7,67.6,453.6,4356.56,5645.6] | ||
| float_list = [] | ||
|
|
||
| for index in new_list: | ||
| if isinstance(index ,float): | ||
| float_list.append(index) | ||
|
|
||
| print(len(float_list)) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| text = "hello my Name Is Nazar" | ||
|
|
||
| text_list = text.split() | ||
|
|
||
| for word in text_list: | ||
| if word[0].isupper(): | ||
| print(word) | ||
|
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. text = "hello my Name Is Nazar" def get_all_upper_starts_words(text): get_all_upper_starts_words(text) |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| num_1 = float(input("type number: ")) | ||
| num_2 = float(input("type number: ")) | ||
| counter = 1 | ||
| num_1_int = int(num_1) | ||
| num_2_int = int(num_2) | ||
|
|
||
| for index in range(num_1_int, num_2_int + 1): | ||
| if index > 0: | ||
| counter = counter * index | ||
|
|
||
| print(counter) | ||
|
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. num_1 = float(input("1 number: ")) for number in range(num_1_int, num_2_int + 1): print(counter) |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import re | ||
|
|
||
| def is_date(date): | ||
| return bool(re.match(r"\d{2}[-]\d{2}[-]\d+", date)) | ||
|
|
||
| date = input("enter date: ") | ||
| while not is_date(date): | ||
| date = input("enter date: ") | ||
|
|
||
| day_list = ["Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"] | ||
|
|
||
| date_list = date.split("-") | ||
|
|
||
| for index in range(len(date_list)): | ||
|
|
||
| date_list[index] = int(date_list[index]) | ||
|
|
||
|
|
||
| def main(date_list): | ||
| if date_list[0] > 30 or date_list[1] > 12 or date_list[2] < 1: | ||
|
|
||
| print("error") | ||
| else: | ||
| if date_list[2] % 4 == 0: | ||
| #рік високосний | ||
| high_years = date_list[2] / 4 #кількість високосних років | ||
| else: | ||
| #рік не високосний | ||
| pass | ||
|
|
||
|
|
||
|
|
||
| main(date_list) | ||
|
|
||
|
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. программа не закінчена |
||
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.
new_list = [1,2,4,5.1,5.5,6,7.7,67.6,453.6,4356.56,5645.6]
float_list = []
def get_floats_len(float_list, new_list):
for index in new_list:
if isinstance(index, float):
float_list.append(index)
print(len(float_list))
return len(float_list)
get_floats_len(float_list, new_list)