Python Tutorial 1-Basic Python Syntax and Commands
Comment the line
# program to create variable "user" # Short command in spyder, press CTRL+1 to comment the line
Syntax to create new Variable “user”
user ="Amit" # print to check the output of new variable print(user)
Variables
- Every variable name can consist letters, numbers and underscore
- No other type of special character should used
- May not start with Number
# Few examples of variables user_name="Amit" userid=23456 user5=234 message="Enter your user name here" myid=user5 # Invalid variable name 5username= "Vijay" user@name="vijay"
Assignment
- Create two variable by name “A” and “B” for doing below activity
- Sum
- Multiply
- Percentage
- Each activity should give result with help of “print” command.
Hope above example will help reader to understand the basic syntax and commands in python. Readers are requested to keep watching our blogs to free tutorials for python . We also provide full time Data Science Training in Delhi, Python Training in Delhi, Machine learning in Delhi . We are best the Data Science Training Institute in Delhi and have best Data Scientist to provide classroom training in Delhi. Please write to us if you are looking for classroom training for Data Science in Delhi.