So I made a very simple program that counts down from 99 (sings 99 bottles of beer) but I keep getting 1 of 2 errors
#!/usr/bin/env python
print("This program sings the song 99 bottles of beer on the wall")
lim = input("What number do you want it to count down from?")
def sing():
global lim
while int(lim) >= 0:
if int(lim) != 1 or int(lim) != 0:
print(lim, "bottles of beer on the wall", lim, "bottles of beer")
print("Take one down pass it around...")
print(lim, "bottles of beer on the wall")
input("\nPRESS ENTER\n")
lim -= 1
sing()
TypeError: unsupported operand type(s) for -=: 'str' and 'int'
Then, when I change lim -= 1 to int(lim) -= 1, it says SyntaxError: illegal expression for augmented assignment
for bottles in range(lim, 0, -1): ....input()and theprint()function are used in Python 3, but your first script line reads:#!/usr/bin/env pythoninstead of#!/usr/bin/env python3. Could you specify which one are you trying to run?