.config
venv
main.py
Packager files
poetry.lock
pyproject.toml
Config files
.replit
replit.nix
import PySimpleGUI as sg
layout = [ [sg.Text('Enter inches'), sg.InputText(key = 'inputValue'), sg.Ok()]]
window = sg.Window('Inches to centimeter calculation', layout)
event, values = window.read()
window.close()
textInput = values['inputValue']
calculatedOutput = float(textInput)*2.54
# pop up a window with the conversion
sg.popup( textInput+ " inches = ", str(calculatedOutput) + " centimeters")