Jump to content

Starting to learn python.

creativename

Ive become proficient in home and Java. Wanted to start learning python, any tips/shortcuts? Also how hard is it compared to Java?

CPU: Intel Core i7 2600k | Mootherboard: ASUS P8z68v-Pro | GPU: EVGA GTX780Ti 3GB | RAM: Kingston HyperX Genesis 8GB (4GBx2) 1600mhz | PSU: Corsair AX760 | STORAGE: Samsung 840 Pro 512GB | COOLER: Noctua NH-C14 | CASE: Fractal Design Define R4 Pearl Black | Operating SystemWindows 7 Professional 64-bit |

Link to comment
Share on other sites

Link to post
Share on other sites

Python compared to java

 

 

 

Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python's built-in high-level data types and its dynamic typing. For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes.

For these reasons, Python is much better suited as a "glue" language, while Java is better characterized as a low-level implementation language. In fact, the two together make an excellent combination. Components can be developed in Java and combined to form applications in Python; Python can also be used to prototype components until their design can be "hardened" in a Java implementation. To support this type of development, a Python implementation written in Java is under development, which allows calling Python code from Java and vice versa. In this implementation, Python source code is translated to Java bytecode (with help from a run-time library to support Python's dynamic semantics).

from python.org's doc

 

but in general if you know one language, is not hard to learn a new, its just a new syntax you have to become familiar with :)

Link to comment
Share on other sites

Link to post
Share on other sites

Python compared to java

from python.org's doc

but in general if you know one language, is not hard to learn a new, its just a new syntax you have to become familiar with :)

Oh so it'll be similar? Guess I'll have to start hitting the syntax dictionary.

CPU: Intel Core i7 2600k | Mootherboard: ASUS P8z68v-Pro | GPU: EVGA GTX780Ti 3GB | RAM: Kingston HyperX Genesis 8GB (4GBx2) 1600mhz | PSU: Corsair AX760 | STORAGE: Samsung 840 Pro 512GB | COOLER: Noctua NH-C14 | CASE: Fractal Design Define R4 Pearl Black | Operating SystemWindows 7 Professional 64-bit |

Link to comment
Share on other sites

Link to post
Share on other sites

Oh so it'll be similar? Guess I'll have to start hitting the syntax dictionary.

 

yea kinda..

//JAVAint counter = 0;String myString = String.valueOf(counter);if (myString.equals("0")) ...//PYTHONcounter = 0myString = str(counter)if myString == "0": ...

or 

//JAVAfor (int i = 1; i < 10; i++){   System.out.println(i);}//PYTHONfor i in range(1,10):    print i

so as you can se its similar :) - but the syntax is not the same :)

Link to comment
Share on other sites

Link to post
Share on other sites

Learning a new language is very easy; all you need to learn is the syntax and the standard libraries. I'd recommend against codecademy however... Get a good book or follow some tutorials.

Link to comment
Share on other sites

Link to post
Share on other sites

Find someone else's source code, google the bits you don't understand

"My game vs my brains, who gets more fatal errors?" ~ Camper125Lv, GMC Jam #15

Link to comment
Share on other sites

Link to post
Share on other sites

For an IDE I recommend PyCharm. It's done by JetBrains and is built upon their industry leading ReSharper technology.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

For an IDE I recommend PyCharm. It's done by JetBrains and is built upon their industry leading ReSharper technology.

1+ for JetBrains - they make some awesome products!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×