Skip to content

develop branch #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

develop branch #1

wants to merge 1 commit into from

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.

2 participants