Skip to content

Commit 2c9eb90

Browse files
Fixing Exercise_10
1 parent fc36bf7 commit 2c9eb90

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

.idea/workspace.xml

Lines changed: 13 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Solution.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,19 @@ def prog_5():
233233
# In case of input data being supplied to the question, it should be assumed to be a console input.
234234

235235
def prog_6():
236-
x = input()
237-
if int(x) < 1000 or int(x) > 3000:
238-
return print("Number should be between 1000 and 3000")
239-
if int(x)%2 == 0:
240-
print("Even")
241-
else:
242-
print("Odd")
236+
n_ = []
237+
str_num_ = ""
238+
for a in range(1000, 3001):
239+
str_num_ = str(a)
240+
indicator_ = 0
241+
for i in str_num_:
242+
if int(i)%2 == 0:
243+
indicator_ += 1
244+
if indicator_ == 4:
245+
n_.append(a)
246+
print(n_)
243247
return
244-
# prog_6()
248+
prog_6()
245249

246250

247251

0 commit comments

Comments
 (0)