Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Monday, November 23, 2020

Python program to import predefined module (Math) and use it in a programby G Krishna Chauhan

Source Code

import math

a=float(input("Enter the number to find Ceil value"))

print(math.ceil(a))

b=float(input("Enter the number to find floor value"))

print(math.floor(b))

c=int(input("Enter the number to find Square root"))

print(math.sqrt(c))

d=int(input("Enter the number to find logarithm of any value with base 10"))

print(math.log10(d))

e=int(input("Enter the number to find the value of Sin Cos Tan"))

print(math.sin(e))

print(math.cos(e))

print(math.tan(e))



OUTPUT


Enter the number to find Ceil value 5.6
6
Enter the number to find floor value5.4
5
Enter the number to find Square root25
5.0
Enter the number to find logarithm of any value with base 102
0.3010299956639812
Enter the number to find the value of Sin Cos Tan45
0.8509035245341184
0.5253219888177297
1.6197751905438615

No comments:

Post a Comment