No products in the cart.

write a python program to pass …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

write a python program to pass list to function and double the odd values and half the even values of a list and display the list element after changing.
  • 1 answers

Ankit Ydv 3 years, 10 months ago

a=[2,7,9,6,3,10,15,13] b=[ ] for i in range (len(a)): if a[i]%2==0: h=a[i]//2 print('even number's,a[i] b.append(h) print(b) c=[ ] for k in range(len(a)): if a[k]%2 !=0: u=a[k]*2 print('odd numbers ',a[k]) c.append(u) print(c) b.extend(c) print(b)
http://mycbseguide.com/examin8/

Related Questions

What is alu
  • 1 answers
Write a program for swapping two numbers?
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
Define packages
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App