Skip to content

Commit

Permalink
Day 27
Browse files Browse the repository at this point in the history
  • Loading branch information
neubrom committed Sep 26, 2021
1 parent b79b33f commit 1627b21
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 27/ miles-to-kilometers-conversion-project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@
window.config(padx=20, pady=20)

# Input box
input_box = Entry(width=10, font=("raleway", 11))
input_box = Entry(width=10, font=("Arial", 14))
input_box.insert(END, 0)
input_box.grid(row=1, column=1)

# Label - Miles
miles = Label(text="Miles", font=("raleway", 11))
miles = Label(text="Miles", font=("Arial", 14))
miles.grid(row=1, column=2, padx=5)

# Label = Is equal to
is_equal_to = Label(text="is equal to", font=("raleway", 11))
is_equal_to = Label(text="is equal to", font=("Arial", 14))
is_equal_to.grid(row=2, column=0)

# Label - Converted value
result = Label(text=0, font=("raleway", 11))
result = Label(text=0, font=("Arial", 14))
result.grid(row=2, column=1)

# Label - Kilometers
kilometers = Label(text="Km", font=("raleway", 11))
kilometers = Label(text="Km", font=("Arial", 14))
kilometers.grid(row=2, column=2)


# Button - To calculate
def convert():
conversion = float(input_box.get()) * 1.609
result.config(text=conversion, font=("raleway", 11))
result.config(text=conversion, font=("Arial", 14))


calculate_button = Button(text="calculate", command=convert, font=("raleway", 11))
calculate_button = Button(text="calculate", command=convert, font=("Arial", 14))
calculate_button.grid(row=3, column=1)


Expand Down

0 comments on commit 1627b21

Please sign in to comment.