Skip to content

Infinite Loop in food_ordering_system.py #23

Open
@slayer321

Description

@slayer321

There is an error in the dequeue method in the Queue class as when I'm running this program
food_ordering_system.py . I'm getting an infinite loop

Placing order for: samosa
Placing order for:Now serving:  pizza
 pasta
Placing order for: biryani
Placing order for: burger
Now serving:  samosa
Now serving:  pasta
Now serving:  biryani
Now serving:  burger
Queue is empty
Now serving:  None
Queue is empty
Now serving:  None
Queue is empty
Now serving:  None
Queue is empty
Now serving:  None
Queue is empty
Now serving:  None
Queue is empty
Now serving:  None 

and it goes on
I think this error can be solved by using the try and except block
I'm new to open source and trying to make my contribution.
I will work on this issue.
can you guide me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions