- 1

what is the python code to create a list of even numbers b/w 100 and 200 using range function and dispaly it using while and for loop

7th Nov 2016, 3:40 PM
Anju kv
Anju kv - avatar
5 Antworten
+ 5
for x in range(100,200,2): print(x)
10th Nov 2016, 4:53 PM
damilare lamidi
damilare lamidi - avatar
0
You just answered your own question. Use while looops and range functions 😉
7th Nov 2016, 5:26 PM
Rumer Obnamia
Rumer Obnamia - avatar
0
i need the syntax maahn!
7th Nov 2016, 5:29 PM
Anju kv
Anju kv - avatar
0
Nobody here wants to do your homework for you.
10th Nov 2016, 12:45 PM
Ron Phillips
Ron Phillips - avatar
0
It's a another way: nums=list(range(100,200,2)) i=1 l=len(nums) while i<=l: print(nums[i]) i+=1 N.B: But i prefer damilare lamidi's way. :)
30th Nov 2016, 10:43 AM
Ahasan Al Rabbi
Ahasan Al Rabbi - avatar