Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8c9b72d

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 694a269 according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/db97d2bf-7e4e-49c1-bc5c-b3739495a9f5/
1 parent 6050d0f commit 8c9b72d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎Added_temperature_convertor_GUI_python_script.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import tkinter as tk
22

3+
34
def convert_temperature():
45
try:
56
temperature = float(entry.get())
@@ -12,6 +13,7 @@ def convert_temperature():
1213
except ValueError:
1314
output_label.configure(text="Invalid input")
1415

16+
1517
# Create the main window
1618
window = tk.Tk()
1719
window.title("Temperature Converter")
@@ -24,9 +26,11 @@ def convert_temperature():
2426

2527
# Create radio buttons for temperature conversion options
2628
var = tk.IntVar()
27-
celsius_to_fahrenheit = tk.Radiobutton(window, text="Celsius to Fahrenheit", variable=var, value=0)
29+
celsius_to_fahrenheit = tk.Radiobutton(
30+
window, text="Celsius to Fahrenheit", variable=var, value=0)
2831
celsius_to_fahrenheit.pack()
29-
fahrenheit_to_celsius = tk.Radiobutton(window, text="Fahrenheit to Celsius", variable=var, value=1)
32+
fahrenheit_to_celsius = tk.Radiobutton(
33+
window, text="Fahrenheit to Celsius", variable=var, value=1)
3034
fahrenheit_to_celsius.pack()
3135

3236
# Create convert button

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /