It takes path components and joins them to match the OS format. When you import os library, you can then call this function as os.path.join(). The function we will need for this task is join in path submodule. It contains various utilities for working with your operating system and, in particular, with files and directories.
To make your code more robust, you need to construct a proper filename string using os library.
This did the job but, unfortunately, major operating systems disagree with Windows on which slash should be used. We specified image file name as "Images/r01.png". 18.4 Target and TimedResponseTask classes.18 Guitar Hero: staircase and iterator functions.17.20 The alien armada wins: missed them!.17 Space invaders: mixins and duck typing.16.9 Virtual attributes via getters and setters.15.9 Calling methods from other methods.15.6 Flexible accumulator with a subtract method.15.1.1 Classes and objects (instances of classes).15 Snake game: object-oriented programming.14.11 Bells and whistles: blinking game over message.11.4 Keeping sounds organized: dictionary comprehension.10.10 Game over, if you run out of cards.10.7 Remembering which cards were turned.10.6 Limiting flipping to just two cards.10.4 Lots of cards, using list enumeration.9.8 Using dictionary to represent a card.9.3 Python function arguments/parameters.8.7 Make the square jump on your command!.8.4 Adding a square and placing it not at the center of the window.6.12 Transported by bats to a random cave.6.2 Variables as post-it stickers (mutable objects).6.1 Recall, Variables as Boxes (immutable objects).5.8 Adding prompt parameter to input_int().Function isolates code from the rest of the program.4.6 Checking that string can be converted to an integer.4.4 Checking whether a value is in the list.3.10 Counting game rounds (Exercise 11).3.7 Show remaining attempts (Exercise 8).3.6 Limiting number of attempts with a break (Exercise 7).3.5 Correct end-of-game message (Exercise 6).3.4 Limiting number of attempts via break (Exercise 5).3.3 Breaking (and exiting, Exercise #4).