H
H
HusniddinEshmuhammatov2018-11-09 20:24:33
Python
HusniddinEshmuhammatov, 2018-11-09 20:24:33

How to enter numbers in Python?

Hello. Such a problem, if I enter into var_1, for example, an integer (1), then everything works fine, but if I enter a real number with a dot (0.1), then an error occurs. What needs to be written in order for decimal digits to work?

if(operation == u'Q (теплота в Дж)' and operation2 == u"q (Электрический заряд в Кл)" and operation3 == u"C (емкость в фарад)"):
        result = var_1**2 / 2*var_2

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question