b=int(1)
if b == 1:
b=2
c = "on my thumb"
elif b== 2:
b=3
c = "on my shoe"
elif b== 3:
b=4
c = "on my knee"
elif b== 4:
b+1
c = "on my door"
elif b== 5:
b+1
c = "on my hive"
elif b== 6:
b+1
c = "on my sticks"
elif b== 7:
b+1
c = "up in heaven"
elif b== 8:
b+1
c = "on my gate"
elif b== 9:
b+1
c = "on my spine"
else:
c = "once again"
for r in range(10):
print("This old man, he played one He played knick-knack " + c +" Knick-knack paddywhack, give your dog a bone This old man came rolling home")
b+1
编码相对较新,所以我真的不知道自己在做什么,但是我试图让 c 在每次打印 r 时都进行更改……以便 IT 完成旧的童谣。我正在用python编码这个......