It is time to move on and start to learn slowly about how to play with coding. Suppose we want others to input information and use it to get results. The following screenshots are all about how to go about it.
The first one is how to use Python to create a Madlib game. You can play with the information and get the result accordingly. What is shown below is just an example.
The usual would be
Roses are red
Violets are blue
I love you
In Python, using Google colab, I have tweaked the code and so, when the program runs, the user is prompted to enter his choice. So, it could be used again and again for different inputs.
I have entered my choices and it is printed thus.
I hope you try it out.
Again an input program for users. Enter your name and age and you get a welcome and a statement of age. This is an example to show how it's done.
Building a calculator
The screenshot below shows how to use the float to add decimal numbers. The input can be from different persons and the program will run smoothly.
The example of the simple calculator below shows how easy it is to add the whole numbers by using int but this cannot be used to add floats and will return an error message.
Keep practicing such exercises and you can soon master it.
images - screenshots