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.
1 parent 6420f1b commit d7f17d6Copy full SHA for d7f17d6
data_structures/2_Arrays/2_arrays_oddnum.py
@@ -0,0 +1,12 @@
1
+'''
2
+Create a list of all odd numbers between 1 and a max number. Max number is something you need to take from a user using input() function
3
4
+
5
+odd_num=[]
6
7
+n=int(input("Enter max number: "))
8
+for i in range (1,n):
9
+ if i%2==1:
10
+ odd_num.append(i)
11
12
+print("Odd Numbers: ", odd_num)
0 commit comments