Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Python
#1
>Python is a language written in C, that compiles on the fly.
>Python is somewhat easy to read and write.
>Python is based on API's and is extremely modular.
>Python is awesome about your variables and a lot of other stuff

they use python for all kinds of things, but mostly for the ease of coding considering that C python runs about 20x slower then C
there is a lot of things about python that make it vary nice to use.

what takes 5 lines to full functions to do in C take, often can be done with 1 line in python.
For instance, to say "Hello World!" as a python program looks like this...
Code:
print "Hello World!"
and then you save it as file.py double click it and boom! your done, you just coded and ran a program.

for a small tutorial i found this that is decent
http://see.stanford.edu/materials/icspp ... Basics.pdf

any questions?
I used to be an admin. Two mergers and a year later and just look at me now. Amazing!
[Image: zaptorx3sig.png]
#2
hello world in c

#include <stdio>
void main (*argc,*argv) { printf("Hello World!"); }
#3
i know its not the greatest example.
http://www.python.org/doc/essays/ppt/acm-ws/sld011.htm
Buy the way i went threw this and its vary old...

and from what they teach you in nub school is more like this... (at least this is the way i learned the little C i do know) Tongue
Code:
#include <stdio>
void main (*argc,*argv) {
    printf("Hello World!");
}
I used to be an admin. Two mergers and a year later and just look at me now. Amazing!
[Image: zaptorx3sig.png]
#4
lol that's the same code as what i posted, you just put line breaks in it
#5
i know i copy pasted it O_o

and python has alot of stuff for math that C does not

to take something to a power you can do the "**" as an operation
and for some reason, factorial(x)

stuff like that

------------- Merged May 18, 2011 -----------------

A grate example of python would be earlier today i was having issues with one of my functions i wrote for matrix file management for removing brackets and comma's while still keeping the other parts untouched. so i go to lookup functions for strings and find that the str.strip(chars) will do just that with a freaking single line of code.

shit like this happens a lot in python, so when you get stuck you google is your best friend.

oh btw even though python is pretty simple and awesome there is so much to it even python programmers don't use a lot of what it offers... at least i don't think i have even ever heard of anyone that does.

I mean look at this thing... its like freakin 2-3 inches thick and its like Its an introduction!
[Image: py3book.jpg]


Edit By:

  ~PaSS~

Moderation Crew


No Double Posting Please

This is your pre warning
I used to be an admin. Two mergers and a year later and just look at me now. Amazing!
[Image: zaptorx3sig.png]
#6
post some projects or code to the board, give people something to see. people love looking at code
#7
Personally I am not the biggest fan of python.  While python most of the time will save you time and lines of code compared to other languages, it also forces you to backtrack a lot when it comes to more complicated functions.  At least thats what I have noticed from my time coding.
Can I have a picture? ......So I can show Santa EXACTLY what I want for Christmas.

[Image: userbar811246.gif]
#8
sk8rmatt Wrote:Personally I am not the biggest fan of python.  While python most of the time will save you time and lines of code compared to other languages, it also forces you to backtrack a lot when it comes to more complicated functions.  At least thats what I have noticed from my time coding.

I would have to disagree, after i code a function for a program i don't have to go back to it, actually avoiding that is good(just to keep things simple). Then again if you mean that you have to look back in the function if its a large one, somewhat yeah. Though I was pretty sure that was normal, And generally the way i code it keeps that to a minimum. Though that would be inside functions, so its not a huge problem due to, when you know python you don't code huge chunks of code. Lots of little chunks is much better.
I used to be an admin. Two mergers and a year later and just look at me now. Amazing!
[Image: zaptorx3sig.png]
#9
I like Python for certain things only. It seems to have better library support for windows than other similar high level languages (Ruby), and I have used it for connecting to serial devices in Windows, and for web app development on the google app engine.

In terms of backpedaling, I think what you are referring to is the seeming lack of verbosity with error detection in Python. Since Python is an interpreted language and thus not compiled prior to execution, errors are not detected untill the program reaches a block of code with an error. Unlike a c compiler which would detect many types of errors prior to runtime.
"Most people think time is like a river, that flows swift and sure in one direction. But I have seen the face of time, and I can tell you, they are wrong. Time is an ocean in a storm."

Users browsing this thread: 1 Guest(s)