我正在尝试这段代码,但我一直遇到问题。我不断收到“无效语法”消息,它突出显示“maracs”作为语法错误。我用几个不存在的单词替换了它并修改了代码,但它仍然给我同样的错误。是的,我的变量是随机词。另外,我真的需要简单的答案,因为我几乎无法理解我在互联网上找到的所有信息。
start = input("On what day will you be leaving? (1 to 7 representing Monday to Sunday respectively.)"
maracs = input("How many days will your stay be?")
pooper = int(start) + int(maracs)
lob = pooper % 7
if lob = 0:
print("You will arrive on Day 7 of the week of your arrival.")
else
print("You will arrive on Day "lob "of the week of your arrival.")
另外,我还有另一个问题。当我尝试其他代码时,我不断收到“NameError”。请帮助以简单的方式定义“NameError”。
a = All
b = work
d = no
e = play
f = makes
g = Jack
h = a
i = dull
j = boy
print(a, b, "and", d, e, f, g, h, i, j)