Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Print Odd Even Negative Integer Count

n,neg,odd,eve,m=int(input()),0,0,0,[int(i) for i in input().split()]
for i in m:
    if i<0:
        neg+=1
    elif i%2==0 :
        eve+=1
    else:
        odd+=1
print("{0} {1} {2}".format(odd,eve,neg))
Comment

PREVIOUS NEXT
Code Example
Python :: nested list flask 
Python :: pandas show head and tail 
Python :: yield value from csv file python 
Python :: treat NaN as a category 
Python :: np.argmax python could not be evaluated 
Python :: access matrix value opencv 
Python :: pyelastic search get document 
Python :: par e impar pygame 
Python :: paschat opposite sanskrit 
Python :: matplotlib plt.sapect 
Python :: numpy bitwise_or multiple images 
Python :: tensorflow conv2d operation 
Python :: Separating a relational plot based on a sixth variable | seaborn relational plot 
Python :: fetch member by id discord.py 
Python :: how to do fibonacci sequence in python 
Python :: how to check if a column exists before alter the table 
Python :: activate inherit function django 
Python :: how to read xlsx file from one directory above python 
Python :: disable network on pytest 
Python :: python find if strings have common substring 
Python :: mechanize python XE #28 
Python :: pandas get only entries that match list 
Python :: reolace text python 
Python :: can we put the object as value in a dictionary in python* 
Python :: plotly dcc.interval bar graph with time 
Python :: extended slices [::2] 
Python :: pop tkinter to the front of the screen 
Python :: aws chalice 
Python :: matplotlib legend from scratch 
Python :: Example of importing module in python 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =