I am a beginner in python and cant understand why this is happening:
from math import *
print \"enter the number\"
n=int(raw_input())
d=2
s=0
while d
You did a mistake..
When you wrote :
from math import *
# This imports all the functions and the classes from math
# log method is also imported.
# But there is nothing defined with name math
So, When you try using math.log
It gives you error, so :
replace math.log with log
Or
replace from math import * with import math
This should solve the problem.