E
E
Egor2015-11-16 21:42:34
Python
Egor, 2015-11-16 21:42:34

A few questions about Python, can you help?

First, how can I make the formula solve without a trace? I want the answer from the first formula not to be displayed (in theory, in the example, the second formula depends on the first one), but from the second one right away?
Secondly: no matter how I run the *.py file, it constantly displays an error in Phyton, where did I go wrong in this simple code?

a = input("Введите число a: ")
b = input("Введите число b: ")
print(a, b)

Description of the error:
6ca8bdbcd6fa410b9de8df994dd13719.png
Many thanks in advance for your help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2015-11-16
Repiev @ega22a

In the screenshot, you are trying to run a py file from the python interpreter, and this must be done from CMD. I don't understand the question about formulas.

T
tsarevfs, 2015-11-16
@tsarevfs

You are confusing the 2 modes. Interactive (running python without parameters) that prints the output of each formula and "batch" when we give the script.py to the interpreter ("c:\\python3\python.exe c:\\myscript.py").
In the second case, nothing is printed unless asked explicitly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question