Let us look at some of the ways of using the print statement/function in Python.
print("amazon","Echo")
amazon Echo
Thursday
Friday
For and While Loops in Python Examples 1
Below is the first example program of Loops
# This program asks user to input a integer number
# It sums all the integers from 1 to the user input
# The for loop runs the same program several times
# This program asks user to input a integer number
# It sums all the integers from 1 to the user input
# The for loop runs the same program several times
Learn Python Easy way - User Input
Let us learn how user input is received in Python
Let us do the most basic exercise
x = input()
3
print(x)
3
Let us do the most basic exercise
x = input()
3
print(x)
3
Thursday
Learn Python Easy Way - Sets
Let us learn what a set is in Python. We use the term set in our language for example when I say, "I have a set of colours" that means I have a set of some colours that are unique, all different colors. Usually "a set" would denote a unique set of items, and that is how it is implemented in Python. The set in Python is used similar to the "Set Theory" in Mathematics. We can do operations like Union, Intersection, Difference on sets in Python.
Learn Python Easy Way - Tuples
Let us understand Tuples in Python. We had learnt Lists in Python in the previous article. Tuples can be understood in comparison to the Lists.
We created Lists. Lists were a set of objects enclosed in [ ] square braces. Tuples are also a set of objects but they are enclosed in ( ) brackets.
We created Lists. Lists were a set of objects enclosed in [ ] square braces. Tuples are also a set of objects but they are enclosed in ( ) brackets.
Tuesday
Learn Python Easy way - Dictionaries
Let us see what is a dictionary in Python. Creating a dictionary is like creating a List, a list of coupled objects, pair of objects. A list is an ordered set of objects, and a dictionary is un-ordered set of objects
Objects in a list can be accessed by their index numbers but objects in a dictionary can't. Each object in a dictionary has a Key and a Value. We need to use the key to access it's value. A key woks like the index number. But a key is not necessarily a number. It can be any data type.
Objects in a list can be accessed by their index numbers but objects in a dictionary can't. Each object in a dictionary has a Key and a Value. We need to use the key to access it's value. A key woks like the index number. But a key is not necessarily a number. It can be any data type.
Wednesday
Learn Python Easy Way Part 6 Copy Lists
Today lets is see how to copy a list. That means we can copy an entire list or a part of it as a separate list. But it has interesting features to it.
Let us create a list of names of cities
Cities = ['Mumbai', 'Pune', 'Nagpur']
Let us create a list of names of cities
Cities = ['Mumbai', 'Pune', 'Nagpur']
Subscribe to:
Posts (Atom)
Featured Post
Creating Games in Scratch for ICSE Class 6
An Introduction to Creating Games in Scratch for ICSE Class 6 Hello friends, I hope you have already read the previous post on An Int...
-
These are several steps you need to use in several cases in removing a trojan or a worm manually. You may need to take one or more of these ...
-
An Introduction to Creating Games in Scratch for ICSE Class 6 Hello friends, I hope you have already read the previous post on An Int...
-
I will list some online Educational games for kids that are designed to teach different shapes. You can play them by clicking on the images ...