Computer Science, asked by ritvik6128, 1 month ago

print first n even numbers in python​

Answers

Answered by gauridakare931
2

Explanation:

print num; In the above example, we have given n*2 as stop, the reason being, if you are to display n even numbers, in the range of 1 to n you will only have n/2 even numbers, and for printing n even numbers you need to double the range, which results in getting the desired number of even numbers i.e. n even numbers.

Answered by Anonymous
1

We can do it simply with the (start,stop,step) command with it in the attachment please.

note: n is the number of output you will have, you can change the number of n acc. to you!

Attachments:
Similar questions