-
Notifications
You must be signed in to change notification settings - Fork 73
Add files via upload #121
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?
Add files via upload #121
Conversation
|
|
||
| list_1 = [1, 45, 2.35, None, 'some_word', 0, 0x1d5e, 0b1011101010111101110001] | ||
| print(list_1) | ||
| for element in list_1: print(type(element)) |
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.
for element in list_1: print(type(element))
нужно на разных строках
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.
<class 'int'>
<class 'int'>
<class 'float'>
<class 'NoneType'>
<class 'str'>
<class 'int'>
<class 'int'>
<class 'int'>
у меня выводит на разных строках
| list_2.insert((i - 1), list_2.pop(i)) | ||
| print(list_2) | ||
| i = i + 2 | ||
| print(i) |
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.
выполнено
| j = 0 | ||
| print(f"Вы выбрали {month_name[(month_number - 1)]}. Месяц {month_name[(month_number - 1)]} относится к времени года" | ||
| f" {sezon[j]}") | ||
|
|
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.
выполнено
| #4. Пользователь вводит строку из нескольких слов, разделённых пробелами. Вывести каждое слово с новой строки. | ||
| # Строки нужно пронумеровать. Если слово длинное, выводить только первые 10 букв в слове. | ||
| phrase = input("Введите фразу из нескольких слов: ") | ||
| for i, s in enumerate(phrase.split()): print(i + 1, s[0:10]) |
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.
print(i + 1, s[0:10])
на разных строках
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.
1 Пользовате
2 вводит
3 строку
4 из
5 нескольких
6 слов,
7 разделённы
8 пробелами
Здесь тоже на разных строках
| o += 1 | ||
| my_range.insert(o, num_input) | ||
| print(my_range) | ||
|
|
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.
o
переменные с такими именами давать не принято
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.
исправил на 'ii'
исправил задание 5, заменил имя переменной
Основы языка Python
Урок 2. Встроенные типы и операции с ними