The Big Book of Small Python Projects by Al Sweigart

The Big Book of Small Python Projects by Al Sweigart

Author:Al Sweigart [Al Sweigart]
Language: eng
Format: epub, mobi, azw, pdf
Publisher: No Starch Press
Published: 2021-06-04T00:00:00+00:00


Exploring the Program

Try to find the answers to the following questions. Experiment with some modifications to the code and rerun the program to see what effect the changes have.

What happens if you change print(' ', end='') on line 149 to print('.', end='')?

What happens if you change ant['y'] += 1 on line 106 to ant['y'] -= 1?

What happens if you change nextBoard[(ant['x'], ant['y'])] = False on line 79 to nextBoard[(ant['x'], ant['y'])] = True?

What happens if you change WIDTH -= 1 on line 21 to WIDTH -= 40?

What happens if you change board = nextBoard on line 119 to board = board?



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.