Oct-14-2019, 06:25 PM
Rather than using quotes, you want to use Python tags (the yellow and blue icon beside quote)
AND, you never increment i so it will always be 1, and you will get endless beer (not an entirely bad outcome).
i= 1 while i<=5: print("beer") else i=6 print("sixpack") else i=10 print("beer")Else is usually used with if, and yes you will need to use if. Take your while and make is <=10, then first line after that make an if statement that tests to see if i is 6. If so, print sixpack, else print beer.
AND, you never increment i so it will always be 1, and you will get endless beer (not an entirely bad outcome).