This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert mm to type size | |
def mm_to_points(mm): | |
# There are 25.4 mm in an inch | |
# There are 72 points in an inch | |
points_per_mm = 72 / 25.4 | |
points = mm * points_per_mm | |
return points | |
type_size_mm = 10 # Replace with your type size in millimeters | |
type_size_points = mm_to_points(type_size_mm) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sqr(num): | |
print(f'√{num} ', end = '') | |
if num < 0: | |
print('or error') | |
else: | |
print(f'or {num ** 0.5}') | |
while True: | |
n = int(input('Enter number for getting square root : ')) | |
sqr(n) |