-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheven_numbers.py
28 lines (25 loc) · 1.06 KB
/
even_numbers.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
#-------------------------------------------------------------------------------
# Name: even number from a list of number
# Purpose: for loop in a list and using break statement in loop
#
# Author: rakesh kumar
#
# Created: 18-04-2017
# Copyright: rakesh kumar
# Licence: MIT-2.0
#-------------------------------------------------------------------------------
def even_numbers():
numbers = [ 951, 402, 984, 651, 360, 69, 408, 319, 601, 485, 980, 507, 725, 547, 544,
615, 83, 165, 141, 501, 263, 617, 865, 575, 219, 390, 984, 592, 236, 105, 942, 941,
386, 462, 47, 418, 907, 344, 236, 375, 823, 566, 597, 978, 328, 615, 953, 345,
399, 162, 758, 219, 918, 237, 412, 566, 826, 248, 866, 950, 626, 949, 687, 217,
815, 67, 104, 58, 512, 24, 892, 894, 767, 553, 81, 379, 843, 831, 445, 742, 717,
958, 609, 842, 451, 688, 753, 854, 685, 93, 857, 440, 380, 126, 721, 328, 753, 470,
743, 527 ]
for x in numbers:
if x<=327:
break
if x%2==0:
print(x)
if __name__ == '__main__':
even_numbers()