Skip to main content

Posts

Showing posts from December, 2017

some Python3

Getting Started .. ** numerically how will you find the square root of a number (i was seeing this tutorial and saw this, it was pretty good). so let me say i want y which is square root of x now what can we do, from above we say y*y = x, so we need to find y such that y when multiplied by itself gives us x. so how to do it. a simple algorithm: - take a number n (you can choose n to be x/2) ,  now  - if n*n == x (or n*n is near x (we need to decide what do mean by near)), n is the square root of x, - else set n = (n + x/n)/2 and repeat the above two steps until the if condition is true. 1. Python is case sensitive - very important, and its an interpreted language not compiled.  wikipedia ,  stack overflow 2.   In Python everything is an object an you can get the type of the object by using   type(<put the object here>) . -- Inputs -- 3. Now if you want to take user input abc = input (' write something ') - it will pr...