Python lessons part 2
In this lessons we want to explain a few command in python first
let me show you:
1.print
print command is used to show the text we fill in it, the code will be like this
a = raw_input ("Write your name: ")
a = raw_input ("Write your name: ")
print "Write this"
and the output will be
Write this
2. raw_input
this command is used to ask the user to write something in the program, the code will be like this
a = raw_input ("Write your name: ")
the output will be
Write your name:
after the user write something in it and enter it the answer of user will be transfered to a variable
You can show the stored answer of user with this code
print "My name is",a
Il make you an easier program first with python like this
a = raw_input ("Write your name: ")
b = raw_input("Write yor age: ")
c = raw_input("Write your last school")
print "Your name is",a,", You",b,"years old, Your last school is",c
Thanks for reading my articles, Study Hard for a Nice Tommorow
I will add more articles soon