Read chapter 5 and Appendix A of the book Blown To Bits .
HINT: For e, divide 2 into r and see if it divides in evenly. If so, they're not relatively prime, so try 3 instead. If not 3, try 5, 7, 11, etc. until you find an e that does not divide in evenly. Then e and r are relatively prime.
HINT: For d, once you know e, write a loop in Python that computes (e*d) % r for each d = 1,2,3, ... until you find a d such that the formula equals 1.
_________________________________________________ | | | | | | | MASTER | | | DINING | | | BEDROOM |BATH|BATH| KITCHEN | ROOM | | | | | | | | |________ |____|__ |_ __ _|__ __| | | | HALLWAY | | HOME | | ________ _____ OFFICE | | | | | | | BED- | BED- | FAMILY | LIVING | | | ROOM | ROOM | ROOM ROOM | | | | | | | |______|_________________|_______________|________|