Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1)
- n = int(input())
- a = n // 100
- b = (n // 10) % 10
- c = n % 10
- print(a + b + c)
- 2)
- n = int(input())
- if n % 4 == 0 and n % 100 != 0 or n % 400 == 0:
- print('YES')
- else:
- print('NO')
- 3)
- a = input()
- b = input()
- c = input()
- a = float(a)
- b = float(b)
- c = float(c)
- dis = b**2 - 4*a*c
- print('Dis = ' + str(dis))
- if dis < 0:
- print('Нет корней')
- elif dis == 0:
- x = -b / (2 * a)
- print('x = ' + str(x))
- else:
- x1 = (-b + discriminant ** 0.5) / (2 * a)
- x2 = (-b - discriminant ** 0.5) / (2 * a)
- print('x₁ = ' + str(x1))
- print('x₂ = ' + str(x2))
- 4)
- n = int(input())
- if (1 <= n <= 2) or (n == 12):
- print('Зимний период')
- elif 3 <= n <= 5:
- print('Весенний период')
- elif 6 <= n <= 8:
- print('Летний период')
- elif 9 <= n <= 11:
- print('Осенний период')
- else:
- print('Не является временем года')
- 5)
- a = int(input())
- b = int(input())
- c = int(input())
- if (a == b) or (b == c) or (c == a):
- print('Yes')
- else:
- print('No')
- 6)
- n = int(input(''))
- if 1000 <= n <= 10000:
- n1 = n // 1000
- n2 = n // 100 % 10
- n3 = n % 100 // 10
- n4 = n % 10
- if (n1 > n2) and (n2 > n3) and (n3 > n4):
- print('Yes')
- else:
- print('No')
- 7)
- n = int(input(''))
- if 1000 <= n <= 9999:
- n1 = n // 1000
- n2 = (n // 100) % 10
- n3 = (n % 100) // 10
- n4 = n % 10
- if (n1 == n4) and (n2 == n3):
- print('yes')
- else:
- print('No')
- 8)
- a = int(input('день'))
- b = int(input('месяц'))
- c = int(input('Год'))
- if (1 <= a <= 31) and (1 <= b <= 7) and (b % 2 != 0) and (c > 0):
- print('yes')
- elif (1 <= a <= 31) and (8 <= b <= 12) and (b % 2 == 0) and (c > 0):
- print('yes')
- elif (1 <= a <= 28) and (b == 2) and (c > 0):
- print('yes')
- else:
- print('no')
- 9)
- a = int(input("a = "))
- b = int(input("b = "))
- c = int(input("c = "))
- if a + b > c and a + c > b and b + c > a:
- print("существует")
- else:
- print("не существует")
- 10)
- a = int(input('Число 1'))
- b = int(input('Число 2'))
- c = int(input('Число 3'))
- n1 = a + b
- n2 = a + c
- n3 = b + c
- if n1 > n2 and n1 > n3:
- print(a, b)
- elif n2 > n1 and n2 > n3:
- print(a, c)
- else:
- print(b, c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement