Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

find the median of input number in a list and print

import statistics
array = []
n = int(input())
for _ in range(n):
    array.append(int(input()))
print (int(statistics.median(array)))
Comment

PREVIOUS NEXT
Code Example
Python :: webdriver.chrome() python not working 
Python :: bst deleting in python 
Python :: includes python 
Python :: gui python 
Python :: noob python 
Python :: Django Redirect Depending On Request Method 
Python :: sum of list of numbers 
Python :: what is fn.call 
Python :: random number list 
Python :: Range all columns of df such that the minimum value in each column is 0 and max is 1. in pandas 
Python :: remove items from list while iterating python 
Python :: python genap ganjil 
Python :: scrapy access settings from spider 
Python :: # convert string to date 
Python :: how can I print all items in a tuple, separated by commas? 
Python :: numpy filter based on value 
Python :: Python Zigzag a matrix for dct 
Python :: pdfs in django 
Python :: get last x elements of list python 
Python :: np.array_equal 
Python :: pure imagination 
Python :: how to pass primary key to url django 
Python :: python get website chrome network tab 
Python :: black jack python 
Python :: Passing Arrays to Methods 
Python :: python dict add item 
Python :: python - sending mail 
Python :: python filter list with list of booleans 
Python :: update in django orm 
Python :: merge two arrays python 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =