Answer the question
In order to leave comments, you need to log in
Why does PyCharm highlight the variable name in red?
Problem with Pycharm: it works on startup, but if you hover over a variable name, it highlights in red. What is the problem?
print("Тест 1")
print("Входные данные")
bic = int(input(": "))
cib = int(input(": "))
ccc = cib // bic
print(ccc)
Answer the question
In order to leave comments, you need to log in
1. You use Russian characters without declaring the encoding
Therefore, at the very beginning:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
Most likely, pycharm indicates that the variable name els is very similar to the else keyword, so there could be an error here. Change the variable name to be more informative and less keyword-like. Now I don’t care, but in the future the habit of giving convenient and meaningful names will help to avoid mistakes.
Why is there a different code on the screenshot and in the question?
And just in case, remove the .py from the folder, it makes no sense and can be a source of implicit blunts or errors. *.py - extension of text python sources and nothing more. It is not necessary and not desirable to give such "extensions" to folders. And if you want to explicitly designate the YP, you can use a dash instead of a dot
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question