
Learn Python as a high level, interpreted language that runs code line by line, with interactive, object oriented features, beginner friendly readability, and cross platform use.
Trace the history of Python from its late eighties development at a Netherlands institute, through C, C++, and Unix shell roots, to Python 1, 2, and 3.
Explore the future of Python, highlighting free availability, community support, cross-platform use, fewer lines of code, and its rise in data science, machine learning, web and game development, and AI.
Discover how top companies use Python in their backend and unlock diverse job opportunities, from Python developers to project managers, data analysts, and financial advisers.
learn how to install Python and set up your development environment by downloading the latest version from the python.org website, with steps for Windows, Linux, and Mac users.
Explore Python's case sensitivity with examples that show a capital P causing errors, and learn that reserved keywords cannot be used as identifiers.
Explore important characters and the print function in Python, including how newline and tab characters affect console output. Try numbers to see the results in the console.
input()
The simplest way to take input is using the input() function which first takes the input from the user, then evaluates the expression and finally converts the entered value into the string format (irrespective of format or type of entered value).
The input() method accepts a string message which is an optional and meant to be displayed on the output console to ask a user to enter input value. Let’s have a look at the syntax.
Code:
num = input ("Enter number:")
print(num)
split()
Using split() method, we can take multiple values in one line. Split method breaks the given input by the specified separator. If separator is not provided, then any white space is a separator. Let’s have a look at the syntax and example to understand in a better way.
Code:
x, y = input("Enter a two value: ").split()
print("Number of boys: ", x)
print("Number of girls: ", y)
print()
Python programming language provides print() function to present the output of a program. The simplest way to present or display a program output to the console is using the print() function where you can pass zero or more expressions separated by commas. Let’s have a look at the example:
Example 1
Print two integers value:
a=7
b=9
print(a, b)
Example 2
Print string and integer value using print command:
num = input ("Enter number :")
print('number entered is : ', num)
By default, python print() function use space ‘ ’ as separator between arguments passed in print() function but we can modify or use any character, number or string as separator. ‘sep’ (Optional) parameter in print() function can be used to specify the character or number or string as a separator to separate the arguments passed in print().
print('Male', 'Female', sep='/')
print('09','12','2018', sep='-')
‘end’ (Optional) parameter in print() function can be used to specify the character or number or string to print at the end. Default is new line character ‘\n’.
print("Welcome to" , end = ' ')
print("Python Progamming Course", end = ' ')
Formatting output using String modulo operator (%)
The String modulo operator (%) can be used for string formatting by adding a placeholder in the string which later replaced with the values in tuple. String modulo operator ( % ) can be used to replace any integer, float or string values. Let’s have a look at the example to understand better.
print("Integer : % 2d, Float : % 5.2f" %(1, 05.333))
Formatting output using format method
use {} to mark where a variable will be substituted and can provide detailed formatting directives. We can either use the exact position of variable to be substituted or empty {} will substitute the variables in the order mentioned. Let’s have a look at the example where we have used a position of the object.
print('{0} {1} {2}'.format('Python', 'Programming', 'Course'))
Comments are descriptions that help programmers better understand the intent and functionality of the program.
They are completely ignored by the Python interpreter.
Advantages of Using Comments:
Using comments in programs makes our code more understandable. It makes the program more readable which helps us remember why certain blocks of code were written.
Other than that, comments can also be used to ignore some code while testing other blocks of code. This offers a simple way to prevent the execution of some lines or write a quick pseudo-code for the program.
How to Write Better Comments?
Use comments to describe what a function does and not the specific details on how the function does it.
Try to remove as many redundant comments as possible. Try writing code that can explain itself, using better function/variable name choice.
Try to make the comments as short and concise as possible.
Learn to use the hash symbol for single-line comments in Python, create multi-line comments, and write effective, concise comments that describe a function’s purpose while keeping code self-explanatory.
Explore Python's five basic data types—numbers, strings, lists, tuples, and dictionaries—and how memory stores numeric and alphanumeric data. Observe operations on each type with simple examples like 1 and 10.
Learn about Python's number data types: int, float, and complex; no separate long type as long integers are represented by default.
Explore the string data type, concatenation with the plus operator, repetition with the asterisk, and boolean expressions that yield true or false in Python.
Explore how Python handles local and global variables, including examples of global and local scope, and learn how the global keyword reads and writes a global variable inside a function.
Explore Python operators across arithmetic, assignment, comparison, logical, identity, membership, and bitwise categories with examples of addition, subtraction, multiplication, division, modulus, and exponentiation.
This course is designed for first time python learners. We have created a syllabus which curates for the need of an absolute beginner to Python. We have provided crystal clear explanations and relevant examples wherever needed. This course may help you shape problem solving skill in real life situations.
This course is designed for newbies only. If you are experienced, then this is not for you. Also, if you want to get a job as python developer or want to join internship in python. This course would be helpful for those as well. Feel free to ask if you have any questions. Apart from lectures, I'll be sharing quizzes later.
If you learn coding, it enhances your personality and also provides you with a new way of looking at things. It enhances your logical reasoning skills. Overall, this course is good for school kids as well.
Once you learn python, it opens the door to many new opportunities like data science, machine learning, data analytics, artificial intelligence, and what not. Grab this opportunity to learn this great language and be awesome.
Note: Nowadays our attention span has reduced drastically. Hence, I would suggest going through each video at least thrice to get optimal benefit out of this course. Keep your pen and paper handy for taking notes or taking down important points.
Hope you enjoy this course! Thanks.