Hello everybody now you are going to learn your first code on python.Hope you like it!!
Have fun!! Let’s start our first programming hour!!
As you see in the photo this is a simple code.The syntax print() is used to output the value inside the “”.You can write anything you want but you have to be careful for “” or ” but is incorrect if you “‘.Be careful to write the code exactly because the python idle will make an error.
You can also create variables .Variables are hmm let’s say a new code that help us to define something,for example:
print(my_name) #output is John
be careful because the space will replace with “_ “.I am going to show you another example of variables for example
a=“My name is John”
print(b) #output is “My name is John”
An other example of variables is :
print(result) # output is 9
Now we are going to request the user for getting the input.The syntax for making this is input().But we have to create a variable for defining.For example:
name=input(“Enter your name:”)#output “Enter your name:”,this is to say to user what he have to do
print(name)#output is the input name
Ok this were some basic code for more we are going to talk in the other lesion.I hope this course have helped you to learn something about python.