Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions 12 cat lesson01_normal_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
_author_='Olga_Strelenko'

#Задание2

answer = input('Введите данные ' )
answer1 = input('Введите данные1 ' )

answer,answer1 = answer1,answer

number= (answer,answer1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

создание кортежа необязательно, так как замена уже произведена, скоро будем разбирать этот тип данных, с ним работать придется крайне редко, можно было оставить print(answer, asnwer1) в качестве результата

print(number [0])
print(number [1])
25 changes: 25 additions & 0 deletions 25 lesson01_easy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
_author_='Olga_Strelenko'

#Задача1

number = int(input(' Введите число '))
for i in str(number):
print(i)

#Задача2

answer_user= input('Введите данные ' )
answer_user1= input('Введите данные1 ')
answer_change = ''
answer_change = answer_user
answer_user=answer_user1
answer_user1= answer_change
print(answer_user, answer_user1)


#Задача3
age=int(input('Введите свой возраст '))
if age >= 18:
print('Доступ разрешен')
else:
print('Извините, пользование данным ресурсом только с 18 лет')
10 changes: 10 additions & 0 deletions 10 lesson01_hard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Заданиеhard
a = float("inf")
if a== a**2:
print(True)
if a== a*2:
print(True)
if a > 999999:
print(True)

print(a)
6 changes: 6 additions & 0 deletions 6 lesson01_normal_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_author_='Olga_Strelenko'

#normal
#Задание1
number = input('Введите число ')
print(max(number))
21 changes: 21 additions & 0 deletions 21 lesson01_normal_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
_author_='Olga_Strelenko'

#задание3

print("Введите коэффициенты для квадратного уравнения (ax^2 + bx + c = 0):")
a = float(input("a = "))
b = float(input("b = "))
c = float(input("c = "))

discr = b**2 - 4 * a * c;
print("Дискриминант D = %.2f" % discr)
if discr > 0:
import math
x1 = (-b + math.sqrt(discr)) / (2 * a)
x2 = (-b - math.sqrt(discr)) / (2 * a)
print("x1 = %.2f \nx2 = %.2f" % (x1, x2))
elif discr == 0:
x = -b / (2 * a)
print("x = %.2f" % x)
else:
print("Корней нет")
Morty Proxy This is a proxified and sanitized view of the page, visit original site.