Привет, подскажите пожалуйста, почему мой код, который написал для проекта в школе, но почему-то выдаёт предупреждение об синтаксической ошибке, в is not, но я не знаю, как это исправить. (писал в юпитер ноутбук).
вот код:
print('hi lets play!')
print('type you name')
name = input()
print('ok, your name is', name, '?')
name_question = input()
if name_question == 'no':
print('type your name correctly')
new_name = input()
print('please restart your game,', new_name) # конец пути
elif name_question is not 'no':
print('ok,', name, 'I hape you are ready, cos we are gonna play now!')
print('first question is: 8*210') # первый вопрос 1680
answer1 = input()
if answer1 == '1680':
print(name, 'correct!')
elif answer1 is not '1680':
print(name, 'restart your game, you lose(')
print('second question is: translate 1 (one) into german language (with letters)')
answer2 = input()
if answer2 == 'eins':
print('Correct! You are doing well,', name)
elif answer2 is not 'eins':
print(name, 'restart your game, you lose(')
print('ok, the last qestion will be... do you like my game?')
answer4 = input()
if answer4 == 'yes':
print('Thank you alot!')
elif answer4 == 'no':
print('sorry, I worked hard:(')
print('Thats all:)')
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.