For the following quiz questions, we will get a preview of comparison operators. In the table below, a=3 and b=4. Operator Description Example == If the values of two operands are equal, then the condition becomes true. (a == b) is not true. != If values of two operands are not equal, then condition becomes … Continue reading Booleans in Python(Comparison operators)
Author: theone9807
enumerate() function in python
There are many situations where we'll need to iterate over multiple lists in tandem, such as this one: In the example above, we have two lists. The second list describes the viciousness of the animals in the first list. A Dog has a viciousness level of 1, and a SuperLion has a viciousness level of 10. We want to retrieve the position of the item in animals the loop … Continue reading enumerate() function in python
for loop in python
A for loop is used for iterating over sequence(i.e. a list, tuple, dictionary, set, string). Syntax of for Loop: The for loop used in python is different from the for keyword used in other programming languages, and work more like iterator as found in other object-oriented programming languages. Example: >Even strings are iterable objects, they … Continue reading for loop in python
Python lambda (Anonymous Functions)
In python, a function without name is known as anonymous function. As we know that def keyword is used to define a normal function, but to define anonymous function lambda keyword is used to create an anonymous function. Lambda functions can take any number of arguments but only one expression, which is evaluated and returned. … Continue reading Python lambda (Anonymous Functions)
VARIABLES IN PYTHON
Unlike other programming language, Declaring variable in python is very easy, In python variable is created at the moment you assign a value to it. And variable can be of any data type. Example: Variable can be of any data type. Rules for Variable Names A variable can have a short name (like x and … Continue reading VARIABLES IN PYTHON
FUNCTION IN PYTHON
Functions are block of codes that are designed to perform specific task .In this chapter you will study everything about function. If you have to perform a task multiple times throughout, so instead of writing code again and again you can define a function for this task and can call that function whenever we want … Continue reading FUNCTION IN PYTHON
TAKING USER INPUT IN PYTHON
Programs are written to solve end user’s problem. To do this you need to get some information from user, at that time input ( ) function is used. What input ( ) function does: While run time when python sees input() function. In the program it pauses the program and wait for the user to … Continue reading TAKING USER INPUT IN PYTHON
Errors and Exception Handling
In this blog we will learn about Errors and Exception Handling in Python. You've definitely already encountered errors by this point in the course. For example: Note how we get a Syntax Error, with the further description that it was an EOL (End of Line Error) while scanning the string literal. This is specific enough … Continue reading Errors and Exception Handling
DATA TYPES IN PYTHON
Since everything is object in python programming, So every values in python has a data type.The various data types in python are: Numbers. List. Tuples. Strings Set Dictionary 1.Numbers In python numbers are categorized as : Int (ex: 3, 4, 5 , …) Float (ex: 3.0, 4.0, 5.0 , …) Complex (ex:1+2j, 2+3j , 2+5j, … Continue reading DATA TYPES IN PYTHON
if,else,elif Statements in python
if Statements in Python allows us to tell the computer to perform alternative actions based on a certain set of results. Verbally, we can imagine we are telling the computer: "Hey if this case happens, perform some action" We can then expand the idea further with elif and else statements, which allow us to tell the computer: "Hey if this … Continue reading if,else,elif Statements in python






