A
A
Andriy Zherebnyuk2020-04-25 16:18:24
Python
Andriy Zherebnyuk, 2020-04-25 16:18:24

What is the error and how to fix it?

print ("Helo word!")

a = input("скільки ти хочеш монет більше 100?:  ")
b = input("А не багато ти хочеш ?:  (не, да.)   :   " )

if b = "да":
    b = "Значит тобі 0"
    print b

elif b == "не":
  v = "Ладно держи"
  print v

mistake :
File "B:\Pyton\rhenj.py", line 3
SyntaxError: Non-ASCII character '\xd1' in file B:\Pyton\rhenj.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dmshar, 2020-04-25
@dmshar

For one thing, correct the errors in the lines
- if b = "yes":
- print b
- print v
Well, "Helo" is written after two "l", and not "word", but "world".
And if to be absolutely precise, then not "not", but "nі", not "yes", but "so", and not "hold", but "treat".
There must be so many errors in such a short program link.

G
GavriKos, 2020-04-25
@GavriKos

How about following the link?
Either declare the encoding in the file header, or don't work with Cyrillic.

D
Dimonchik, 2020-04-25
@dimonchik2013

drive letter is cool!
according to the subject - replace the volyauk with the Latin alphabet, you can even transliterate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question