Python函数,否则

时间:2018-12-08 04:34:21

标签: python function

我编写了以下代码,并尝试运行它,但未运行。它有我找不到的错误吗?

def greet():
    print('Hi there mister')

kor_Var = input('Enter kor')

if kor_Var != walls:
   print('Incorrect pin')
else:
   greet()

1 个答案:

答案 0 :(得分:1)

您需要将“ walls”更改为字符串:

[('LOSS BEFORE INCOME TAXES', '(900,000)', '(900,000)'),
 ('INCOME TAXES (RECOVERED)', '(90,000)', '(90,000)'),
 ('RETAINED EARNINGS - BEGINNING OF YEAR', '9,999,999', '9,999,999'),
 ('EXPENSES', '', ''),
 ('Subcontracts', '8,058', '2,655'),
 ('Business taxes', '116', '-'),
 ('', '600,000', '600,000'),
 ('GROSS PROFIT (50%; 2016 - 50%)', '500,000', '500,000'),
 ('Bad debts', '-', '50'),
 ('Salaries, wages and benefits', '400,000', '400,000')
]