PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'''⚠️⚠️Please read this
This code's output might take a while'''
import matplotlib.pyplot as plt
import numpy as np
import math # importing modules
# Input Validation
num = None
while not num:
try:
num = float(input())
except ValueError:
print("Enter a number")
if num % 1 == 0:
num = int(num)
else:
None
#Output
print(' Logarithms \n')
print(f"Log10 of {num} = {math.log10(num)}")
print(f"\nLog2 of {num} = {math.log2(num)}")
print(f"\nLog5 of {num} = {math.log(num,5)}")
#Graph
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run