Python project 2

 jumpto.cc/python-new

We can use this code:

for number in range (10):

    print(number)

To list the numbers 1-10

How can we get our computers to count to 1000? *this might take a long time

We can also do more complicated things, can you get it to list every multiple of 3 up to 300? (we use * to multiply)

Can you create code to complete this list: 0, 1, 4, 9, 16, 25, 36...

We can also combine math with words.

Can you figure out how to print something like this:

Hello!

Helloo!

Hellooo!

Helloooo!

Hellooooo!

Helloooooo!

Hellooooooo!

Helloooooooo!

Hellooooooooo!

Helloooooooooo!


Next we can try to outline a simple game event using a list of Pokemon, we will rerun the code for each Pokemon to get something like this:

A wild Mewtwo appears!

Do you want to fight or run away? fight

The Mewtwo attacks you!


Go! Bulbasaur!

Mewtwo has defeated Bulbasaur!

Press enter to send out your next Pokemon 


Go! Squirtle!

Mewtwo has defeated Squirtle!

Press enter to send out your next Pokemon 


Go! Charmander!

Mewtwo has defeated Charmander!

Press enter to send out your next Pokemon 


Go! Pikachu!

Mewtwo has defeated Pikachu!

Press enter to send out your next Pokemon 


You have no more Pokemon.

You have been defeated!