MENU
Question -

Write a program that takes a number and calculate and display the log, square, sin and cosine of it.



Answer -

# Program to display the various values of a number import math
> > > number = input (“Enter the number :”)
> > > print “Number is”, number
> > > print “Log value of number is” math.log (number)
> > > print “Square of number is”, math.pow (number, 2)
> > > print “Sin value of number is”, math.sin (number)
> > > print “Cosine value of number is”, math.cos (number)

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×