I have written a python program which gets an input from user then runs a code and returns values, it is being saved as .py extension. 
I want to run it on different PC which doesn't have python. Is there a way to save it or compile it to .exe?
Note: I am used to writing C programs which are directly compiled (code blocks) and gives .exe
The C code that you are used to writing compiles into .exe as you already know. However, not every PC can run .exe files, ie. those running on Mac, and other operating systems. So in short, the answer is no. However, there is a branch of Python known as Jython, which runs on the JVM (Java Virtual Machine) allowing it to work on any operating system with any PC. The ability to work on any machine in any environment is one of the most prized features of Java, and with Jython (which is compiled to Java code) you are able to emulate this key feature with python.
Python program to run on PC