Python is just one more programming language. So, what makes everyone talk about it?
That is a good question, and you will answer it yourself. The important thing is to surf this wave and not be left behind.
How to start?
Python is free, which means you will not spend a cent to get started.
PyCharm is the most popular tool for Python. You can get the Community version for free here -> [https://www.jetbrains.com/pycharm/].
The first step, in my opinion, is to watch this video that will take you from zero to an intermediate level of understanding of the language.
By Mike Dane -> [https://www.youtube.com/watch?v=rfscVS0vtbw]
You can also compile your Python program on Linux to run on any Windows computer as an .exe:
pip install auto-py-to-exe auto-py-to-exe
Then you can start writing simple programs like the following:
Simple Calculator:
print("\nExample: 4.5*9 or 35/5 or 800-123")
formula = input("Type the math formula: ")
i = 0
j = 0
value_c = ""
value_d = ""
value_e = ""
length = len(formula)
while i < length:
if formula[i] == "+" or formula[i] == "-" or formula[i] == "*" or formula[i] == "/":
value_d = formula[i]
j = 1
elif j == 0:
value_c = value_c + formula[i]
else:
value_e = value_e + formula[i]
i += 1
value_c = float(value_c)
value_e = float(value_e)
if value_d == '+':
print(str(value_c) + " + " + str(value_e) + " = " + str(round(value_c + value_e, 12)))
if value_d == '-':
print(str(value_c) + " - " + str(value_e) + " = " + str(round(value_c - value_e, 12)))
if value_d == '*':
print(str(value_c) + " * " + str(value_e) + " = " + str(round(value_c * value_e, 12)))
if value_d == '/' and value_e != 0:
print(str(value_c) + " / " + str(value_e) + " = " + str(round(value_c / value_e, 12)))
if value_d == '/' and value_e == 0:
print(str(value_c) + " / " + str(value_e) + " = " + "undefined")
Just copy, paste, and run this code. See the output below:
