Students of the School
celebrated World Computer Science Week from 9th
December to 15th December 2019, wherein they participated and
enjoyed the activities on Hour of
Code like Learn to code with Minecraft, Hot Wheels, Monster High, and many more
fun, game-based activities and earned
Digital Certificates. The Hour of Code is a global computer science initiative
that creates a fun and creative environment for students to be introduced to
the concepts of computer programming.
Monday, December 16, 2019
Thursday, May 9, 2019
PYTHON CLASS XI
CHAPTER 1
PYTHON
• Interactive, interpreted, and object-oriented programming
language.
• Simple syntax
• Developed by Guido Van Rossum in 1991 at the National
Research Institute for Mathematics and Computer Science in the Netherlands.
• Name was inspired by: Monty Python’s Flying Circus
1.1
PYTHON PROGRAMMING ENVIRONMENT
• Available on a wide variety of platforms including Windows,
Linux and Mac OS X.
• Official Website: python.org
• IDLE stands for Integrated Development and Learning
Environment. Python IDLE com- prises Python Shell and Python Editor. Python
Shell Python Editor
1.2
Display on screen
>>>print('hello world')
hello world
1.3
Names (Variables) and Assignment Statements
• Variables provide a means to name values so that they can
be used and manipulated later.
• Assignment Statement: Statement that assigns value to a
variable.
>>> english = 57
>>>print(english)
Python associates the name
(variable) english with value 57 i.e. the name (variable) english is assigned
the value 57, or that the name (variable) english refers to value 57. Values
are also called objects.
1.3.1
Rules for creating a name (variable)
• Must begin with a letter or _ (underscore character)
• May contain any number of letters, digits, or underscore
characters. No other character apart from these is allowed.
1.3.2
Shorthand Notation
In [3]: a = 6
a = a + 5
print(a)
a = 6
a += 5
print(a)
11
11
2
1.3.3
Multiple Assignments
• Used to enhance the readability of the program.
>>>msg, day, time = 'Meeting', 'Mon', '9'
totalMarks = count = 0
1.4
Arithmetic Operators
>>>print("18 + 5 =", 18 + 5) #Addition
print("18
- 5 =", 18 - 5) #Subtraction
print("18
* 5 =", 18 * 5) #Multiplication
print("27
/ 5 =", 27 / 5) #Division
print("27
// 5 =", 27 // 5) #Integer Division
print("27
% 5 =", 27 % 5) #Modulus
print("2
** 3 =", 2 ** 3) #Exponentiation
print("-2
** 3 =", -2 ** 3) #Exponentiation
18 + 5 = 23
18 - 5 = 13
18 * 5 = 90
27 / 5 = 5.4
27 // 5 = 5
27 % 5 = 2
2 ** 3 = 8
-2 ** 3 = -8
>>>print("'how'
+ ' are' + ' you?':", 'how' + ' are' + ' you?')
print("'hello' * 5 :", 'hello' * 5)
'how' + ' are' + ' you?': how are you? 'hello' * 5 :
hellohellohellohellohello
Precedence
of Arithmetic Operators
1.5
Relational Operators
• Used for comparing two expressions and yield True or
False.
• The arithmetic operators have higher precedence than the
relational operators.
>>> print("23 < 25 :", 23 < 25)
#less than
print("23
> 25 :", 23 > 25) #greater than
print("23 <= 23 :", 23 <= 23)
#less than or equal to
print("23
- 2.5 >= 5 * 4 :", 23 - 2.5 >= 5 * 4) #greater than or equal to
print("23
== 25 :", 23 == 25) #equal to
print("23
!= 25 :", 23 != 25) #not equal to
• When the relational operators are applied to strings,
strings are compared left to right, character by character, based on their
ASCII codes, also called ASCII values.
>>>print("'hello'
< 'Hello' :", 'hello' < 'Hello')
>>>print("'hi'
> 'hello' :", 'hi' > 'hello')
'hello' < 'Hello' : False 'hi' > 'hello' : True’
1.6
Logical Operators
• The logical operators not, and, and or are applied to
logical operands True and False, also called Boolean values, and yield either
True or False.
• As compared to relational and arithmetic operators,
logical operators have the least precedence level.
>>>print("not
True < 25 :", not True) #not operator
>>>print("10
< 25 and 5 > 6 :", 10 < 25 and 5 > 6) #and operator
>>>
print("10 < 25 or 5 > 6 :", 10 < 25 or 5 > 6) #or operator
Precedence
of Logical Operators
Python
Keywords
• Reserved words that are already defined by the Python for
specific uses.
>>>import keyword
print(keyword.kwlist)
[’False’,
’None’, ’True’, ’and’, ’as’, ’assert’, ’break’, ’class’,’continue’, ’def’,
’del’, ’elif’, ’else’, ’except’, ’finally’, ’for’, ’from’, ’global’, ’if’,
’import’, ’in’, ’is’, ’lambda’,’nonlocal’, ’not’, ’or’, ’pass’, ’raise’,
’return’, ’try’, ’while’, ’with’, ’yield’]
LATEST ICT TECHNOLOGIES
Here are the top five technology trends you
need to know to work in any industry.
1. Internet of Things
(IOT)
One of the biggest tech trends to emerge in
recent years is the Internet of Things. Simply put, the Internet of Things
(abbreviated IOT) is the idea that all technological devices can be connected
to the internet and to each other in an attempt to create the perfect marriage
between the things. How will this impact you? It depends on your industry.
For example, for those who work in marketing, advertising, media or business
management, IOT could provide a wealth of information on how consumers engage
with products by tracking their interactions with digital devices. In turn,
this data could be used to optimize marketing campaigns and user experiences.
How it’s affecting
industries: The really cool thing about IOT is that it’s not only
changing the way we do business but also the business models we use to do it.
For example, according to Deloitte, (also known as pay-per-use models) are
going become increasingly more popular across all industries as new customer
data becomes available.
2. Machine learning
Another exciting emerging technology is
machine learning, which is essentially a computer’s ability to learn on its own
by analyzing data and tracking repeating patterns. For example, social media
platforms use machine learning to get a better understanding of how you’re
connected with those in your social network. They do this by analyzing your
likes, shares and comments and then prioritizing content from your closest
connections, serving you that content first.
How it’s affecting
industries: In addition to shaping your day-to-day interactions with
friends on social media, machine learning is also changing the way companies do
business with customers. According to Deloitte, companies like Google are using
machine learning which can continue learning even when offline. The
result? Machine learning is reshaping the way businesses interact with their
customers in a big way by helping them anticipate and meet customer needs more
easily.
3. Virtual reality (VR)
Remember watching movies about virtual reality
and thinking how cool it would be if it was actually like that in real life?
Well, it’s about to be. Although VR has been around since the 1950s, until
recently the technology wasn’t able to deliver the fully immersive digital
experience users have been craving. That’s about to change with recent
improvements to both hardware and programming, and the effects are going to be
felt across almost every industry from retail to education.
How it’s affecting
industries: Virtual reality has been a popular component of video
games for several years and this trend is continuing to expand. In addition to
video games, VR is likely to affect companies across the board as they adopt
the technology to help them engage customers more effectively and optimize
their sales and marketing efforts. It’s also a potentially useful tool for
learning and is increasingly being adopted by educational organizations.
4. Touch commerce
Being able to buy anything you want with the
touch of a finger may have seemed like a fantasy a few years ago, but it’s now
a reality. Merging touchscreen technology with one-click shopping, touch
commerce allows consumers to buy products easily from their phones. After
linking their payment information to a general account and enabling the
feature, customers are able to buy everything from clothes to furniture with
just a fingerprint.
How it’s affecting
industries: According to Deloitte, this is one of the biggest things
to hit eCommerce in recent years with purchases of this type expected
to this year alone and retailers in almost every industry
anticipating an increase in sales directly related to this new technology.
5. Cognitive Technology
Cognitive technology is in the same vein as
machine learning and virtual reality except that it’s a broader concept. For
example, the cognitive technology umbrella includes things like natural
language processing (NLP) and speech recognition. Combined, these different
technologies are able to automate and optimize a lot of tasks that were
previously done by people, including certain aspects of accounting and
analytics.
How it’s affecting
industries: Although cognitive technologies have a broad range of
applications, Deloitte predicts that the industry sector most affected by this
trend initially will be the software sector with projected to adopt
these technologies by 2020.
Subscribe to:
Posts (Atom)