From 49f79e7c60ca025a716659212e837d6d5cf5864f Mon Sep 17 00:00:00 2001 From: UgurKosif Date: Sat, 12 Nov 2022 16:10:41 +0300 Subject: [PATCH] =?UTF-8?q?oker=C4=9Fobna=C4=9Fonaer=C4=9Fo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- leap-year.py | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/leap-year.py b/leap-year.py index 7509825..400d6fc 100644 --- a/leap-year.py +++ b/leap-year.py @@ -1,41 +1,6 @@ - Umut çalışıyor... - - - -# **Exercise | ?comprehension | ?range() | ?len() | ?nested for loop() | ?any() | ?sum() | ?append()** -# 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. -# What is the smallest positive number which is evenly divisible by all of the numbers from 1 to 20? -# MClay -nums_prime = [] - -for i in nums : - prime = [] - for j in range(2,i) : - prime.append(i % j != 0) - if all(prime) and i != 1 : - nums_prime += [i] -new_number = [] -while True : - for i in nums_prime : - temp = [] - for j in range(len(nums)) : - temp.append(nums[j] % i == 0) - if nums[j] % i == 0 : - nums[j] = nums[j] // i - if any(temp) : - new_number += [i] - if sum(nums) == 20 : - break -count = 1 -for i in new_number : - count *= i -print(count) -# Default function to implement conditions to check leap year -def CheckLeap(year) : - # Checking if the given year is leap year - - -print("merhaba") + +Umut çalışıyor... +int("merhaba") x = 6