Skip to content

Exercise3EscapeRoomAsyncio

sethnielson edited this page Feb 11, 2019 · 2 revisions

Exercise 3: Escape Room With Asyncio

Assigned 2/6/2019
Due 2/11/2019
Points 25

Overview

This is a follow-up to the exercise 2. Your new program should behave exactly like your old program. There will be a client and a server file, they will connect to each other exactly as before.

But instead of using sockets, you need to use Asyncio's Protocol class along with the create_server and create_connection methods from the event loop.

Please remember, we are using Python 3.6 syntax! Python 3.7 introduced some new syntax that we aren't up-to-date on yet. So when looking at help files, make sure to select 3.6.

Extra Credit

You can still use input() to get user input, but it's not the right way to work with Asyncio. If you can figure out getting user input in an Asyncio appropriate way, you may have 10 points of extra credit.

Grading

You should have the following files in your GitHub repository.

<your_repository_root>/src/exercises/ex3/escape_room_server_asyncio.py
<your_repository_root>/src/exercises/ex3/escape_room_client_asyncio.py

As with exercise 2, your server and client should support NO COMMAND LINE parameters (host and port chosen by default). The server may take one parameter for the selected port, and the client may take one parameter for the host and port (":" or ""), but this is optional just as it was in exercise 2. You will not lose points if you don't have this.

The grading breakdown is like exercise 2.

  • Correct server: 15
  • Correct client: 10