Skip to content

Commit c21249b

Browse files
committed
Fixed minor bugs.
1 parent 87aee28 commit c21249b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def intro_8th_slide_sports_entry(self,) :
623623
self.sports_role_dd.place(x=300, y=250)
624624
self.all_screen_obj.append(self.sports_role_dd)
625625

626-
club_role_text = CTk.CTkLabel(self.app, bg_color=self.bg_color, fg_color=self.bg_color, text="Length of participation (Months)", font=self.text_font)
626+
club_role_text = CTk.CTkLabel(self.app, bg_color=self.bg_color, fg_color=self.bg_color, text="Length of\nthe sport\n(Months)", font=self.text_font)
627627
club_role_text.place(x=50, y=350)
628628
self.all_screen_obj.append(club_role_text)
629629

@@ -640,7 +640,7 @@ def intro_8th_slide_sports_entry(self,) :
640640
self.all_screen_obj.append(next_button)
641641

642642
def intro_8th_slide_sports_entry_validator(self,) :
643-
try :
643+
#try :
644644
sports_name = self.sports_tb.get()
645645
sports_role = self.sports_role_dd.get()
646646
sports_length = int(self.sports_length.get()) ## This gives exception if not int so we can tell user that the data is wrong
@@ -674,9 +674,10 @@ def intro_8th_slide_sports_entry_validator(self,) :
674674
back_button.place(x=150, y=450)
675675
self.all_screen_obj.append(back_button)
676676

677-
except :
678-
messagebox.showerror("Invalid Sports Entry", "Invalid Sports Entry!")
679-
self.intro_8th_slide_sports_entry()
677+
#except Exception as err:
678+
#print(err)
679+
#messagebox.showerror("Invalid Sports Entry", "Invalid Sports Entry!")
680+
#self.intro_8th_slide_sports_entry()
680681

681682
## Too complicated to implement for hackathon, will implement for CAC instead
682683
# def intro_9th_slide(self,) :

sports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ def __init__(self, name, position, totalMonths) :
33
self.name = name
44
self.position = position
55
self.totalMonths = totalMonths
6-
self.sportsValue = position * (totalMonths^2/5) ## This leads to the gradual decline of extra months of sports, from 8 months compared to 4 months is large, but 20 to 24 is smaller
6+
self.sportsValue = position * (totalMonths**(2/5)) ## This leads to the gradual decline of extra months of sports, from 8 months compared to 4 months is large, but 20 to 24 is smaller

0 commit comments

Comments
 (0)