-
Notifications
You must be signed in to change notification settings - Fork 3
Introduction To Python
Python is an interpreted language. Interpreted language means every code will be compiled and executed at the same time line by line. If there is any syntax error on line 20 , till line 20 program will run as expected and then it will throw an error.
Lets write our first program to show "Hello world " on console screen.
print(" Hello World")
that's it. here print() is a function to print the message enclosed in double quotes to console screen.
Now, lets look at how data will be shown with the message.
dayOfLecture = 1
print(f" this is day {dayOfLecture } of Python class")
Sometimes, if the logic is tricky and you want to inform others about your logic or have doubt that you will remember a big part of logic , you can write comments above the code.
Comments are written with prefix #
.
For Example:
# This is a comment telling you that this code will print Welcome! 3 times.
print("Welcome! "*3)
Keep Learning. Never Settle! 😊
- Home
- 1.Introduction To Python
- 2. DataTypes
- 3. Strings and Slicing of collection
- 4.If else & Loops
- 5. Break, continue, pass
- 6. Functions
- 7. Modules
- 8. Clarifying basics
- 9. File Handling
- 10. Exception Handling
- 11. Dig into Collections
- 12. Iterators, Generators and list comprehension
- 13. lambdas , map, filter and other concepts
- 14. args, kwargs an default parameters
- 15. Functional Programming
- 16. OOPs