Sample Program



Ok now we're going to be applying the knowledge that you learnt and make a simple program and you're also going to learn something new in this tutorial as well.

First things first, what you're going to be learning today is how to get input from the user for example you're making a medical system and you need the patient to put in their details. So you're going to make a sample input form including something like name, age and such stuff. All this time I've been displaying this information to the user, but not getting information from the user. So in this tutorial, you're going to learn just how to get this information from the user.

To get this information we're going to use a keyword or reserved word in python known as input How input works is that going to write input(“Question”) This means that : What is in the brackets is what is going to be displayed. It's what you're going to be asking for example, we can change the question to be name. input(“Name :”) and this now displays Name : It is like a label to show the information to the user just to make the system user-friendly and make it easier for the person who is using it.

You can use it in many ways.For example, you can assign a variable to this input. So we can do something like this : name=input(“Name”) So any name or anything that the user put will be stored in the variable called name and with this variable, we can do cool things like print it out or even concatenate it to another string. Please refer to the video to get this concept much better.

Here is the code from the tutorial : Python Basics Code Files

For any Questions or Comments, Feel free to Contact Me.