Python

1. Learning Curve and Code Readability

Firstly let’s take a look at Java syntax to add two numbers…

class AddNums
()
{
    public static void main(String args[])
    {
        int first = 1;
        int second = 2;
        int sum = first + second;
        System.out.println(sum);
    }
}

Now let’s see how to write the same code in Python…

first = 1
second = 2
sum = first + second



print(sum)






<head> <script data-ad-client="ca-pub-1516974465305514" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script></head>


تعليقات