diff --git a/bad_code_1.py b/bad_code_1.py index e0c1b30..9243ac1 100644 --- a/bad_code_1.py +++ b/bad_code_1.py @@ -1,3 +1,3 @@ if __name__ == "__main__": -print 'I hate it when people call me "Fifa", that's my cat's name!' + print ("'I hate it when people call me \"Fifa\", that's my cats name!'") diff --git a/bad_code_2.py b/bad_code_2.py index 3b3b64b..1d4db6e 100644 --- a/bad_code_2.py +++ b/bad_code_2.py @@ -1,4 +1,5 @@ if __name__ == "__main__": # For you're ouwn helth, Im cuting you of to a max of 4 beers. - for i in range(4, -1, -1): - print("%d bottles of beer on the wall, %d bottles of beer. Take one down, pass it around, %d bottles of beer on the wall." % (i, i, i)) + for i in range(4, 0, -1): + j = i-1 + print("%d bottles of beer on the wall, %d bottles of beer. Take one down, pass it around, %d bottles of beer on the wall." % (i, i, j)) diff --git a/fixed_code_1.py b/fixed_code_1.py new file mode 100644 index 0000000..9243ac1 --- /dev/null +++ b/fixed_code_1.py @@ -0,0 +1,3 @@ +if __name__ == "__main__": + print ("'I hate it when people call me \"Fifa\", that's my cats name!'") + diff --git a/fixed_code_2.py b/fixed_code_2.py new file mode 100644 index 0000000..1d4db6e --- /dev/null +++ b/fixed_code_2.py @@ -0,0 +1,5 @@ +if __name__ == "__main__": + # For you're ouwn helth, Im cuting you of to a max of 4 beers. + for i in range(4, 0, -1): + j = i-1 + print("%d bottles of beer on the wall, %d bottles of beer. Take one down, pass it around, %d bottles of beer on the wall." % (i, i, j))