I've been learning Python lately, but I wanted to see if anyone could help me out with coming up with a code. basically, I want it to be able to calculate the mode and median of a set of numbers (that would be a raw_input- so variables). But without using library functions. It would be awesome if anyone could help me out!
If anyone has any ideas, please let me know! I'm lost on this one!! I really appreciate it, thanks in advanced!
I did come up with this however for the average if anyone cares (that was an easy one for me to figure out, heh)
total = 0.0
count = 0
while count < 3:
number=float(raw_input("Enter a number: " ))
count = count + 1
total = total + number
average = total / 3
print "The average is " + str(average)
The whole point of Python is to use the supplied library functions.
Python isn't complied dude, it's interpreted (or included within an EXE/BIN which just interprets it, and makes it 'look' and 'act' like a traditional compiled binary).
There is also CPython, which can 'compile' it into bytecode, similar to Java.