Skip to content

Conversation

@OBakir90
Copy link
Owner

No description provided.

Copy link
Collaborator

@Ashaghel Ashaghel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

@@ -0,0 +1,13 @@

class Person:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something went wrong here :D

elif entrance.lower() == 'no':
print('Thank you, see you next time...')
else:
input('Your request is not recognised')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to give an option or command for user to re enter yes or finish

"Tinta": 8,
"Erol": 6,
"Orhan": 5
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice use of dict



def add_student(name,grade):
if name in students:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may need to add some string manipulation, capital case or lower case

print('We already have a student with this name')
return

if grade not in [1-10]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is tricky, remember all input from user get registered as "String", so you need to cast it here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also [] is list in python (similar to Array ) so you have here one item with value -9.
If you want to check range
you can write
grade not in range(1,11)

try:
students[name] = int(grade)
print(f"{name} is added with grade {students.get(name)}")
except ValueError:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually it good to add a general exception JIC

print('Please type a number as a level')

def update (name, grade):

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line is not a good idea in python :) things can get off records quickly here with no ()


def update (name, grade):

if grade not in [1 - 10]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input need casting

'finish': finish
}

while order:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work on while one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants