PYTHON PROGRAMMING: DO NOT USE INPUT FUNCTION, use sys.argv
Write a program that reads the inputs repeatedly using a while
loop. The code should skip the even numbers and print only the odd
numbers. Inputs are always valid.
Input:
a) 3 7 6 4 5 9 0 2 3
b) 3 4 6 5 3 4
Output:
a) 3
7
5
9
3
b) 3
5
3
Code:
import sys
length=len(sys.argv)
i=1
lst=[]
while(length>1):
lst.append(int(sys.argv[i]))
i=i+1
length=length-1
for i in lst:
if not i%2==0:
print(i)
Output:

PYTHON PROGRAMMING: DO NOT USE INPUT FUNCTION, use sys.argv Write a program that reads the inputs...