Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
count(even/odd)fromlist.py
#python 3.5.2 #find number of odd and even numbers present in the list def count_even_odd(list): even=0 odd=0 for e in list: if e%2==0: even+=1 else : odd+=1 return even,odd list=[1,2,3,4,5,6,7,8,9,10] even,odd=count_even_odd(list) print('No of evens = ',even) print('No of odds = ',odd)
run
|
edit
|
history
|
help
0
shuru17
PyLSV
Интересный Python - Вопрос 1
Lesson 5
Reading XML file
Remove all Adjacent duplicates using a loop
Dictionary - count characters
PySuper
Celcius to Fahrenheit
PyCutRod