num = int(input("Введите трехзначное число: "))
first_digit = num // 100
second_digit = (num // 10) % 10
third_digit = num % 10
if first_digit == second_digit or second_digit == third_digit or first_digit == third_digit:
print(1)
else:
print(0)
Ответ:
def sq(k):
for i in range(len(k)):
if k[i] == k[::-1][i]:
return True
k = list(input())
if sq(k) == True:
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
num = int(input("Введите трехзначное число: "))
first_digit = num // 100
second_digit = (num // 10) % 10
third_digit = num % 10
if first_digit == second_digit or second_digit == third_digit or first_digit == third_digit:
print(1)
else:
print(0)
Ответ:
def sq(k):
for i in range(len(k)):
if k[i] == k[::-1][i]:
return True
k = list(input())
if sq(k) == True:
print(1)
else:
print(0)
Объяснение: