From 660b2aa9ec70c2bcd8d0618756345723de520641 Mon Sep 17 00:00:00 2001 From: gahjelle Date: Fri, 18 Oct 2024 13:13:45 +0200 Subject: [PATCH] Final QA --- python-variables/employees.py | 2 +- python-variables/scopes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-variables/employees.py b/python-variables/employees.py index fa77066161..2210b30ac1 100644 --- a/python-variables/employees.py +++ b/python-variables/employees.py @@ -5,7 +5,7 @@ def __init__(self, name, position, salary): self.name = name self.position = position self.salary = salary - type(self).count += 1 + Employee.count += 1 def display_profile(self): print(f"Name: {self.name}") diff --git a/python-variables/scopes.py b/python-variables/scopes.py index f770538425..309df9795b 100644 --- a/python-variables/scopes.py +++ b/python-variables/scopes.py @@ -15,8 +15,8 @@ def inner_func(): # Local scope local_variable = "local" print(f"Hi from the '{local_variable}' scope!") - print(f"Hi from the '{global_variable}' scope!") print(f"Hi from the '{nonlocal_variable}' scope!") + print(f"Hi from the '{global_variable}' scope!") inner_func()