#JTSK-350112
# main.py
# Taiyr Begeyev
# [email protected]
import mod_conversion

start_length = int(input("Enter the start length: "))
end_length = int(input("Enter the end length: "))
step_size = int(input("Enter the step size: "))

# decision making
print("Enter s to print the result on the screen. \
Choose any other to generate conversion HTML table")
choice = input()

if choice == 's':
    # call function from imported module
    mod_conversion.in2cm_table(start_length, end_length, step_size)
else:
    # call function from imported module
    mod_conversion.in2cm_table_html(start_length, end_length, step_size)
    print("Open the html file :)")   
예제 #2
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 350112
# main.py
# Shun-Lung Chang
# [email protected]

from mod_conversion import in2cm_table

# inputs
start = int(input())
end = int(input())
step = int(input())

# convert inches to cms, and return results
inches, cms = in2cm_table(start, end, step)

# print results
print('{0:>5}{1:>10}'.format('inch', 'cm'))
for i in range(len(inches)):
    print('{0:5.1f}{1:>10.1f}'.format(inches[i], cms[i]))
예제 #3
0
"""
    350112
    a1 2.py
    MICHAEL MAGAISA
    [email protected]
"""

import mod_conversion

x = int(input("Enter the start value: "))
y = int(input("Enter the end value: "))
step = int(input("Enter the step value: "))

mod_conversion.in2cm_table(x, y, step)
예제 #4
0
from mod_conversion import in2cm_table

sta = int(input('Enter the start:'))
en = int(input('Enter the end:'))
ste = int(input('Enter the step size here:'))

in2cm_table(sta, en, ste)