-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathleap-year.py
102 lines (62 loc) · 1.46 KB
/
leap-year.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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")
x = 6
while x < 15:
print(x)
x += 1
print("saık erdemmir")
print(b)
x = 6
while x < 15:
print(x)
x += 1
#code bug control
print("All rights are reserved")
print(b)
print("Hello Cohort-12")
print(b)
print("Hello Cohort-12")
print("MErhabalar")
print(b)
<<<<<<< HEAD
print("Hello Cohort-12")
print("Buraya bakarlar")
print ("merhaba")
print("Hello Cohort-12
x = 6
while x < 15:
print(x)
x += 1
print("Hahahaha")
print("have nice holiday")
print("yavaş öğreniyorum galiba")