Posts

Showing posts from December, 2017

Sum of Individual Digits of a Number in Python

Image
Hello Everyone, In this post i am gonna discuss about how to write python program to find the sum of individual digits of a number.. Ok,Lets move on to the Program. Program: n=int(input("enter number")) sum=0 while n!=0:     sum=sum+n%10     n=n//10      print("sum is",sum) It is a very simple program where we calculate the sum of each digit of the given number.here we use while loop for repeating the operation. see the image for the output... Here is same code in Java, http://vitaminj.kittu.xyz/2017/12/find-sum-of-digits-of-given-integer.html Stay tuned for more interesting topics.. Thanks

Factorial of a number in Python

Image
Hello Everyone, In this post i am gonna discuss about how to write a Python program to know the factorial of the given number. Program: # Factorial of given number using Python c=int(input("enter the number")) a=1; for a in range(1,c+1):     a=a*c print ("factorial of ",c,"is",a) Here we declare the input c as integer.In this program we use a for loop for getting the factorial value. range() is defined function in Python.the above for loop is like enhanced for loop in Java. The Output for this is, Here is the same program in Java, http://vitaminj.kittu.xyz/2017/12/factorial-of-agiven-number.html In C language, http://vitaminc.kittu.xyz/2017/12/factorial-of-number.html Stay tuned for more interesting topics, Thanks

Quadratic Equation in Python

Image
Hello Everyone, In this post we gonna discuss about how to solve quadratic equation in Python.. Before that in the last post we discuss Interactive Mode in Python.. Here is the link, http://vitaminpy.kittu.xyz/2017/12/additionsubtractionmultiplication.html In this post we are going to learn how to do Python programming in Script Mode. Ok why are you waiting,lets move into program. Program: # Solve the quadratic equation ax**2 + bx + c = 0 import cmath # To take coefficient input from the users a = float(input('Enter a: ')) b = float(input('Enter b: ')) c = float(input('Enter c: ')) # calculate the discriminant d = (b**2) - (4*a*c) # find two solutions sol1 = (-b-cmath.sqrt(d))/(2*a) sol2 = (-b+cmath.sqrt(d))/(2*a) print("solution1",sol1) print("solution2",sol2)      Here in the first line we import the cmath package which includes all mathematical functions like math.h in c. The input function is used ...

Top 10 Technologies which you are going to learn in 2018

Image
Hii Everyone...This is GM Kumar.. In this post i would like to share the top 10 technologies you are going to learn in 2018... Click the image to see the details.. 1.Artificial Intelligence: 2.Blockchain:                                                         3.Augmented Reality(AR)& Virtual Reality(VR): 4.Big Data: 5.Cloud Computing: 6.Angular&React: 7.DevOps: 8.Internet Of Things: 9.Intelligent Apps: 10.Robotic Process &Automation: These are the  top most technologies which are evolving in the future,Hope you guys this is useful. Stay tuned... Please Subscribe our blogs for more interesting topics.. Thanks

Addition,Subtraction,Multiplication ,Division

Image
Hello Everyone... In this we post we will learn the basic arithmetic operations in Python... Before that .. In Python we have to modes,they are 1.Interactive Mode:       In this mode ,we directly execute code to Python prompt. Example:            >>>2+6    8           2.Script Mode:            In this mode,we save our source code into a file with .py extension and then we run our file in our python shell.       Example:                    python myfile.py In this post,we deal with the Interactive node. Here we go ... Addition,subtraction,multiplication and division in python. Generally,in python comments are start with # symbol . See the below picture.... Here we didn't use any variables right now,just we did like we do in our calculator right?? And this is the pi...

Why Should We Learn Python??

Image
Hii Everyone,Welcome To The Python Programming... Before moving into the Topics , We want to motivate you about the question Why Should You learn Python?? The direct answer is...... It is easy to learn compare to all other languages like C,C++,Java etc. And it is one of the most popular and used languages in the recent times. Python includes all object-oriented features and techniques of programming. Python is used to create web and desktop applications.And also in some of the most popular web applications like Instagram, YouTube, Spotify all has been developed in Python, and you can also develop next big thing by using Python.  Here is the Link to dive into Py Programing,  https://www.python.org/downloads/  Here is the procedure to install the python shell.. 1.Download the latest version from the above link.. 2.Follow the instructions... 3.Now open the shell .. Hurray!! We Successfully installed python shell..Now Lets Dive ...

Importance of Python

Python was designed to be easy to understand and its name came from Monty Python So a lot of its beginner .  Python is Very easy to Understand , being a very high level language python reads like simple English sentences and less syntaxes which will boost up Beginners . Python handles a lot of Complexity for you , So it is very Beginner - Friendly in that it allows beginners to focus on learning programming concepts and not have to worry about too much details It is very Flexible , Scalability and a very nice ecosystem for Future jobs on Machine learning .. So Python is really worth learning for every programmer  :) Start Learning Python Hope this post helped you 

Welcome to Python Programming

Hi friends , this is GM Kumar and we are here again with a New Blog For Programming in Python , And the Schematic is again the Same , We do the Very Same program in C , Java , JavaScript and Python Languages helping those who have knowledge in at least one Language to learn the other from that Language . If you are New to the Programming then don't worry , Follow this Process C Java JavaScript and then Python it would be easier to Learn Coding Logic in simple language like C and Python and Syntaxes in Java and JS . So 1 2 3 Let the Python Begin .. Subscribe to our Blog and get an email when ever we post anything .. Blah .. See you in the Next Post Bye for Now !?!