LEVEL : Beginner
Start coding tonight
without any installation
Part 2/6
For a first test: wait for the window to load and click on the Run button.
The result
you should expect
You should see the following result:
- Estimated launch time: 15 sec.
- Goal: Get access to the code directly online.
For the next articles, a code will be shared. You will be able to launch it and directly observe the results.
How it works?
It is quite simple. You give orders. The machine executes.
This window is an online Python interpreter. In other words, you can test and code right here on this website.
There are two boxes.
A white box. (The editor) This is the INPUT part. this is where you give the orders. You write the lines of code there.
A black box. (The console/terminal) This is the OUTPUT part. By clicking RUN, the orders you requested are carried out. Instructions written in INPUT are translated by the Python interpreter. The results of the code are displayed there.
In this basic example: by writing print(“Hello, I am your financial analyst robot”) in the editor, you ask the interpreter to display the message: Hello, I am your financial analyst robot
4 common programming problems
These issues probably affect you too. But, every challenge has a solution:
Problem 1: work on code that doesn’t work.
Stop codes that do not work. Since I started to program Python in finance, I seek my inspiration in books, forums, in the tutorials and on YouTube. When a topic is interesting, I usually copy the code to adapt it. I am continually facing computer bugs.
Solution: Here, the idea is to have a functional code that works online and on this website.
Problem 2: Waste time on your machine.
Solution: No need to install any software, launch the software or even find its code in folders. Here you have everything at your fingertips.
Problem 3: Not practicing enough.
Practice is essential. Otherwise, how can we observe that certain practices work?
Solution: This window is interactive, try the code, modify it, test its limits. It’s the perfect environment to learn faster.
To change the code, it must sometimes be forked (copied) and may require opening an account in Repli.it.
Problem 4: Take safety into account.
Solution: The technology behind this window is offered by Repl.it. Concretely, it offers you a virtual machine. It’s a bit like lending you a computer on the web for free. This virtual machine has no impact on your direct machine. Everything is in the cloud.
Use the full power of Python with libraries
We are only one step away from launching the first programs: launching our virtual financial analysts on the markets.
To do this: we have to give our analysts the tools to analyze.
In other words, our code must be able to rely on the necessary existing technologies (such as Machine Learning, Data analysis and so on)
Therefore, we use libraries.
A Python library is a collection of functions and methods that allows you to perform many actions without writing your own code.
Guess what? The Python window allows you to import the libraries.
Be careful: importing a library into the Python interpreter can take a little time. (This is due to the installation of the library in the virtual machine. Once installed, relaunching the code will not require reinstalling the library)
Are you ready?
Tools are in place. They are now available to us. It’s time to get down to business.
I am waiting for you in the next article:
What if I want to use Python on my own machine?
Indeed, if for example, you want to keep your code and carry out a project on your own computer, I suggest you to use an IDE. An integrated development environment (IDE) is a software that allows you to program, test, interpret and debug your code in one place. Pycharm is a good solution.
https://www.jetbrains.com/pycharm/
Credits: