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 a333b26

Browse files
improved bugs
1 parent bd1aa28 commit a333b26

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎Sgpa_To_Cgpa_Convertor/sga_to_cgpa.py

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

3+
34
def create_sgpa_entries(): # Create SGPA entries based on the total number of semesters entered by the user.
45
num_semesters = int(num_semesters_entry.get())
56

@@ -18,13 +19,14 @@ def create_sgpa_entries(): # Create SGPA entries based on the total number of s
1819
cgpa_calc.grid(row=num_semesters + 2, column=0, columnspan=2, padx=10, pady=5)
1920

2021

21-
def validate_sgpa_entries(): # Validate the SGPA entries to enable or disable the CGPA calculation button.
22+
def validate_sgpa_entries(): # Validate the SGPA entries to enable or disable the CGPA calculation button.
2223
filled_entries = [entry.get() for entry in sgpa_entries]
2324
if all(filled_entries):
2425
cgpa_calc.configure(state="normal")
2526
else:
2627
cgpa_calc.configure(state="disabled")
2728

29+
2830
def calculate_cgpa(): # It is used to calculate cgpa.
2931
sgpa_values = [float(sgpa_entry.get()) for sgpa_entry in sgpa_entries]
3032

@@ -36,7 +38,8 @@ def calculate_cgpa(): # It is used to calculate cgpa.
3638

3739
reset_button.configure(state="normal")
3840

39-
def reset_entries(): # This is used to reset entries after calcuting Cgpa.
41+
42+
def reset_entries(): # This is used to reset entries after calcuting Cgpa.
4043
for label in sgpa_labels:
4144
label.destroy()
4245
for entry in sgpa_entries:

0 commit comments

Comments
(0)

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