Computer Science, asked by gracykujur, 7 months ago

WAP to accept values from user up to a certain limit entered by the user, if the number is odd then add to the list (using append).

plzz guys don't write useless answer otherwise i will report your answer...

Answers

Answered by scorder96
2

Answer:

Which programming language are you using?

First you have to take user integer input.

Then you have to make a loop (I use for loop for java)

In loop , define the limit starting from 0 to the number entered by the user (put the variable)

Then inside loop, take another user input and close.

Now it will take inputs upto a certain level.

Then add an if statement and write like- if user input is odd, then store it in an array (new array variable) .

The array variable will act as a list and store all odd entered numbers.

Answered by anshugupta6783
2

Answer:#wap to accept a list from the user upto a certain limit and if the no. is even the add to list

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n:

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n: a=int(input('enter the element'))

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n: a=int(input('enter the element')) if a%2!=0:

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n: a=int(input('enter the element')) if a%2!=0: l.append(a)

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n: a=int(input('enter the element')) if a%2!=0: l.append(a) i=i+1

#wap to accept a list from the user upto a certain limit and if the no. is even the add to listl=[]n=int(input('enter the limit'))i=1while i<=n: a=int(input('enter the element')) if a%2!=0: l.append(a) i=i+1print(l)

Similar questions