Thursday, April 24, 2014

Day 19

Explored some Python at Gork Learning. Worked on, Hour of Code: Disease Epidemic! The curious case of the glowing nose. Learned to write a program that reads in how many cats are infected now, and prints out how many cats will be infected in an hour.

The code I used:
cat = int(input("Cats infected? "))
cat_hour = cat * 3
print("Cats infected in an hour", cat_hour, )

The interaction looked like this:
Cats infected? 3
Cats infected in an hour 9

No comments:

Post a Comment