We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf8a21b + c995fc0 commit b64700aCopy full SHA for b64700a
Print_List_of_Even_Numbers.py
@@ -1,4 +1,25 @@
1
-#user can give in put now
2
-#pyhton3
+#user can give input now
+#python3
3
+
4
+import sys
5
6
+if sys.version_info[0]==2:
7
+ version=2
8
+else:
9
+ version=3
10
11
+if version==2:
12
+ n=input('Enter number of even numbers to print: ')
13
+ printed=0
14
+ numbers=0
15
+ while printed!=n:
16
+ if numbers%2==0:
17
+ print numbers,
18
+ printed+=1
19
+ numbers+=1
20
21
+if version==3:
22
+ print ([x for x in range(int(input()),int(input())) if not x%2])
23
24
25
-print ([x for x in range(int(input()),int(input())) if not x%2])
chaos.py
@@ -7,5 +7,5 @@ def main():
x = 3.9 * x * (1-x)
print (x)
-main()
-
+if __name__ == '__main__':
+ main()
0 commit comments