Cyber Metric Services (CMS) IT Hardware & Networking Training Institute, brings to you a large array of training courses, geared to train you for the professional sphere. At Cyber Metric Services, you can enroll for the following courses:
• Diploma in Hardware and Networking
• Master Diploma in Hardware and Networking
• Post Graduate Diploma in Hardware and Networking
• Cisco Certified Network Associate (CCNA)
• Microsoft Certified IT Professionals (MCITP)
• RHCE – Advance
/dev/fort: you can build it in a week @emwJames Aylett
Imagine a place with no distractions – no IM, no Twitter, in fact no internet access at all. Within, a dozen or more developers, designers, thinkers and doers. And a lot of a food. Now imagine that place is a fort. I talk about why anyone would want to go on holiday to do their day job, the bits of the internet we had to rebuild to work without the internet, and some tips you can use even when you don't have a fort.
Cyber Metric Services (CMS) IT Hardware & Networking Training Institute, brings to you a large array of training courses, geared to train you for the professional sphere. At Cyber Metric Services, you can enroll for the following courses:
• Diploma in Hardware and Networking
• Master Diploma in Hardware and Networking
• Post Graduate Diploma in Hardware and Networking
• Cisco Certified Network Associate (CCNA)
• Microsoft Certified IT Professionals (MCITP)
• RHCE – Advance
/dev/fort: you can build it in a week @emwJames Aylett
Imagine a place with no distractions – no IM, no Twitter, in fact no internet access at all. Within, a dozen or more developers, designers, thinkers and doers. And a lot of a food. Now imagine that place is a fort. I talk about why anyone would want to go on holiday to do their day job, the bits of the internet we had to rebuild to work without the internet, and some tips you can use even when you don't have a fort.
What We Talk About When We Talk About Coding (Open Source Bridge 6/21)Zoe Landon
Technology is a language all its own, and open source is no exception. But as more people jump into the world of programming, they can be quickly overwhelmed by the volume of jargon. How, then, do we explain powerful technologies without misleading people? It takes empathy, clever language, and a bit of Shakespeare.
Technology So Easy Your Lawyer Could Do It (OSCON 5/18)Zoe Landon
Technology is a language all its own, and open source is no exception. But as more people jump into the world of programming, they can be quickly overwhelmed by the volume of jargon. How, then, do we explain powerful technologies without misleading people? It takes empathy, clever language, and a bit of Shakespeare.
In this talk we will explore the Zen of Python and the famous PEP8 Style Guide. Learn about the tenets of the Python language and how you can apply them to make your code beautiful and functional. After all, Readability Counts!
Inheritance Versus Roles - The In-Depth VersionCurtis Poe
This is the paper to accompany my slides explaining what's wrong with inheritance and how traits (roles) help to solve these issues: http://www.slideshare.net/Ovid/inheritance-versus-roles
A dispute on probably the most controversial feature in ES2016 leads us back to age old questions at the base of the most common practices of the development universe.
Do the “sacred laws” still apply?
jsDay 2016 closing keynote (http://2016.jsday.it/talk/a-class-action/)
There's an old joke that goes, “The two hardest things in programming are cache invalidation, naming things, and off-by-one errors.” In this talk, we'll discuss the subtle art of naming things – a practice we do every day but rarely talk about.
What We Talk About When We Talk About Coding (Open Source Bridge 6/21)Zoe Landon
Technology is a language all its own, and open source is no exception. But as more people jump into the world of programming, they can be quickly overwhelmed by the volume of jargon. How, then, do we explain powerful technologies without misleading people? It takes empathy, clever language, and a bit of Shakespeare.
Technology So Easy Your Lawyer Could Do It (OSCON 5/18)Zoe Landon
Technology is a language all its own, and open source is no exception. But as more people jump into the world of programming, they can be quickly overwhelmed by the volume of jargon. How, then, do we explain powerful technologies without misleading people? It takes empathy, clever language, and a bit of Shakespeare.
In this talk we will explore the Zen of Python and the famous PEP8 Style Guide. Learn about the tenets of the Python language and how you can apply them to make your code beautiful and functional. After all, Readability Counts!
Inheritance Versus Roles - The In-Depth VersionCurtis Poe
This is the paper to accompany my slides explaining what's wrong with inheritance and how traits (roles) help to solve these issues: http://www.slideshare.net/Ovid/inheritance-versus-roles
A dispute on probably the most controversial feature in ES2016 leads us back to age old questions at the base of the most common practices of the development universe.
Do the “sacred laws” still apply?
jsDay 2016 closing keynote (http://2016.jsday.it/talk/a-class-action/)
There's an old joke that goes, “The two hardest things in programming are cache invalidation, naming things, and off-by-one errors.” In this talk, we'll discuss the subtle art of naming things – a practice we do every day but rarely talk about.
Use C++ to Manipulate mozSettings in GeckoChih-Hsuan Kuo
If you want to manipulate mozSettings with JavaScript, you can reference to Settings API on MDN (https://developer.mozilla.org/en-US/docs/Web/API/Settings_API).
But if you want to manipulate it with C++, we can only reference to the codebase of Gecko. Now, let me show you some example.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
6. Top Language in TIOBE
Position
May 2013
Position
May 2012
Delta in
Position
Programming Language
1
2
3
4
5
6
7
8
9
10
1
2
4
3
5
6
7
8
9
11
=
=
↑
↓
=
=
=
=
=
↑
C
Java
Objective-C
C++
C#
PHP
Visual Basic
Python
Perl
Ruby
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
7. Top Languages in Github
Javascript
21%
Ruby
12%
Java
8%
Python
8%
Shell
8%
PHP
7%
C
6%
C++
5%
Perl
4%
Objective-C
3%
0%
5%
10%
15%
20%
25%
https://github.com/languages
8. Top Languages in Github
Javascript
21%
Ruby
12%
Java
8%
Python
8%
Shell
8%
PHP
7%
C
6%
C++
5%
Perl
4%
Objective-C
3%
0%
5%
10%
15%
20%
25%
https://github.com/languages
29. Zen of Python
one
There
temptation to guess. and refuse
In --obviousbe
Unless
Errors
Althoughcasesbetter
breakis betternever pass Peters
Specialfacebetter may beats
ReadabilityPython,tonested.
Sparse explicitly silenced.
FlatZenshould“”ambiguity,silently.
Complexispracticality dense. obvious
Simpleshouldofaren'tthanit. enough
Explicitisrules. than complex.
Beautifulisthisthanthan implicit.the at
The importbetterone--docomplicated. only
>>>thethe-iccounts.byspecialpurity. to
$ pythonofisbetterthanTimugly.
that way
not preferably
be
first
one
There
temptation to way
In --obvious guess. and preferably
Unless casesyou're
Errors betternever Dutch.refuse
Althoughisrules. may beats
breakisfacebetter topass Peters
Specialexplicitlythan dense.
ReadabilityPython,silenced.
Sparseunlessofaren'tnested. obvious
FlatZenshouldbeambiguity,silently.
Complexisthatbetter thanit. enough
Simpleshouldcounts.than implicit.the at
Explicitofbetterone-- complex.
Beautifulpracticalitydocomplicated. only
The importisbetterthanTimugly.
>>>thetheisthisthanbyspecialpurity. to
not be
Now
first
one is cases than
There
temptationrules.
In --obvious way may and preferably
Unless betterguess. beats
Errors better never Dutch.refuse
Althoughisbetterone-- dense.
breakisfacetoyou're pass Peters
Specialexplicitly tonested.
Readabilitybetterthan complex.
Sparseunlessofaren'tthanit. obvious
FlatZenshouldbethannever.silently.
Complexisthatbetterthan implicit.the
Simpleshouldcounts.bydocomplicated. at
Explicitofisbettersilenced. enough only
Beautifulpracticalityspecialpurity. to
ThethetheisPython,thanTimugly.
ambiguity, be
not
Now
first
one is cases thanmay not preferably
There
temptationbetterone-- andsilently.
In the better way to beats
Unless face
Errorsunlessofguess. dense.
Althoughbetternever Dutch.refuse
breakisexplicitly silenced.
Specialshould aren'tpassbetter
Readabilitytoyou're nested. obvious
Sparseshouldcounts. thanit. enough
Flat--obviousbethannever.ugly.
Complexisthatbetterthan implicit.the at
Simplethepracticalitydocomplicated. only
Explicitisisbetterthancomplex. than *right*
Beautifulisbetterthanspecialpurity. to
never ambiguity, be
rules. often
is
now.
Now
first
one is cases thanmay not preferably
There
temptationbetterone-- andsilently.
In the better way to beats
Unless face
Errorsunlessofguess. dense.
Althoughbetternever Dutch.refuse
breakisexplicitly silenced.
Specialshould aren'tpassbetter
Readabilitytoyou're nested. obvious
Sparseshouldcounts. thanit. enough
Flat--obviousbethannever.ugly.
Complexisthatbetterthan implicit.the at
Simplethepracticalitydocomplicated. only
Explicitisisbetterthancomplex. than *right*
Beautifulisbetterthanspecialpurity. to
never ambiguity, be
rules. often
is
If
now.
Now
first
one is cases thanoften
There implementation isbetter
temptationrules. may not preferably
In the better way to andhard than
Unless face ofguess. beats
Errorsunlesscounts. Dutch.refuse
Althoughbetternever passit.
breakisexplicitly silenced.
Specialshould aren'tnested. obvious
Readabilitytoyou'renever.silently.
Sparseshouldbetterthandense. enough at
Flat--obviousbethanthan implicit.explain,
Complexispracticality complex.to the only
Simpletheisbetterthandocomplicated. *right*
Explicitisbetterone--specialpurity. to
never is
that ambiguity, be
it's
If
now.
Now
first
one is bad idea. may isbetter
Therea implementation not preferably
temptationrules. to andhard than
In the better way silenced.
Unless faceto guess. beats
Errorsunlessofnever
Althoughisbetterone-- dense.
breakisexplicitly thancomplex.to explain,
Specialshould aren'tDutch.refuse the
Readabilitybetterthandocomplicated.
Sparseshouldcounts. passit. obvious at
Flat--obviousyou're nested. enough only
Complexisthatbethannever.silently. *right*
Simplethepracticalityspecialpurity. to
cases ambiguity, be
betterthanoften
never is
it's
If
now.
Now
first bad idea. may
one is implementation isbetter
Therea better way to noteasy
temptationrules. silenced.
In the faceto guess. andhard than
Unlessunlessofnever
Errorsshouldcounts. Dutch.refuse explain,
Althoughisbetterone-- beats
breakisexplicitly thandense. to the
Specialshould aren'tpassit. obvious
Readabilitybetterthandocomplicated. at
Sparsethethatyou're nested. enough only
Flat--obviousbethannever.silently. *right*
Complexispracticalityspecialpurity. to
cases ambiguity, preferably
betterthanoften
never is
be
it
it's
If
now.
Now is badrules. may
first implementation is preferably
onemay better thanto noteasy
Therea faceidea. silenced.
temptationbetterone-- andhard than
In the explicitlyidea.beats
Unlessunlessofwaythan dense.
Errorsshouldcounts.
Althoughbetterguess. do betterto explain,
breakisshould never Dutch.refuse the
Specialisthat aren'tpassit. obvious at
Readabilitytoyou're nested. enough only
Sparsethepracticalityspecialpurity. *right*
Flat--obviousbethannever.silently. to
benever ambiguity, be
cases is often
a good
Namespacesaare is often
it
it's
If
now.is badrules. may
Now --obvious thanto is
first implementation not be
onemay better way silenced.
There faceidea. idea.andeasy than
temptationbetterone-- beats
In the explicitlythan dense. obvious
Unless should guess. do betterto idea
Errorsunlessofnever Dutch.preferably
Althoughcases aren'tpassit.great explain,
breakashouldcounts.honkingrefuse the at
Specialisthatyou'renever.hardenough only
Readabilitytobeambiguity,silently. *right*
Sparsethepracticalityspecialpurity. to-benever one
good
let's bad good often
Namespacesaareof may
it
it's
If
now.is implementation is
Now --obvious thanto not be
first better way silenced.
onemay faceidea. those!
There explicitlyidea.andeasy than
temptationrules.one-- beats obvious
In thedo that guess. do betterto idea
Unlessunlessofnever Dutch.preferably
Errorsshouldcounts.honkingrefuse explain,
Althoughcases aren'tpassit.great the at
breakathepracticalityspecialpurity. only
Specialshouldyou'renever.hardenough *right*
Readabilitytobeambiguity,silently. to-benever is
more one
>>>
let's bad areof often
Namespacesaidea. may is
it
it's
If
now.is implementation not
Now --obvious thanto and be
first better way silenced.
onemay faceto guess.Dutch.preferably
There explicitlythose! easy than
temptationrules. idea.beats obvious
In thedo that neverhonkingrefuse idea
Unlessunlessgoodone--do betterto explain,
Errorsshouldofaren'tpassit.great the at
Althoughcasesyou'renever.hardenough only
breakathepracticalityspecialpurity. *right*
Specialshouldbeambiguity,silently. to-benever is
more one
35. Python 2.x
Python 3.x
2.7.x is the latest version
under development
more 3-party library
2to3.py
built-in on many OS
more supported unicode
the past in someday
the future in someday
41. Environment
For Windows User,
Download From
http://www.python.org/download/
if you want to launch Python in command line,
add the path of Python binary file into PATH variable.
48. Check Version of Python
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
49. Check Version of Python
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
52. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
53. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
prompt
54. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
prompt
means that your turn!
57. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
58. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
59. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
60. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
61. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
62. Interactive Shell
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
63. Interactive Shell
Python 2.7.5 (default, May 20 2013,
$ python
23:41:46)
Python 2.7.5 (default, May 20 2013,
[GCC 4.2.1
23:41:46) Compatible Apple LLVM 4.2
(clang-425.0.28)] on Apple
[GCC 4.2.1 Compatibledarwin LLVM 4.2
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
"license" for more information.
Type "help", "copyright", "credits" or
>>> 1 + 2 + 3
"license" for more information.
6
>>> 1 + 2 + 3
>>> “Hello World”
6
‘Hello World’
>>> “Hello World”
>>> x
‘Hello=World’
100
>>> x = 100
64. Interactive Shell
Python 2.7.5 (default, May 20 2013,
$ python
23:41:46)
Python 2.7.5 (default, May 20 2013,
[GCC 4.2.1
23:41:46) Compatible Apple LLVM 4.2
(clang-425.0.28)] on Apple
[GCC 4.2.1 Compatibledarwin LLVM 4.2
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
"license" for more information.
Type "help", "copyright", "credits" or
>>> 1 + 2 + 3
"license" for more information.
6
>>> 1 + 2 + 3
>>> “Hello World”
6
‘Hello World’
>>> “Hello World”
>>> x
‘Hello=World’
100
>>> x = 100
y
200
65. Interactive Shell
23:41:46)
Python 2.7.5 (default, May 20 2013,
$ python
[GCC 4.2.1
23:41:46) Compatible May LLVM 4.2
Python 2.7.5 (default,Apple20 2013,
(clang-425.0.28)] on Apple
[GCC 4.2.1
23:41:46) Compatibledarwin LLVM 4.2
Type "help", "copyright", "credits"
(clang-425.0.28)] on Apple
[GCC 4.2.1 Compatibledarwin LLVM 4.2or
"license" for more information.
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
>>>
"license" for more information.
Type1"help",3"copyright", "credits" or
+ 2 +
6
>>> 1 + 2 + 3
"license" for more information.
6
>>> “Hello+World”
1 + 2
3
‘Hello World’
>>> “Hello World”
6
‘Hello=World’
>>> “Hello World”
x
100
>>> x
‘Hello=World’
y
200
100
>>> x = 100
y
200
66. Interactive Shell
23:41:46)
Python 2.7.5 (default, May 20 2013,
$ python
[GCC 4.2.1
23:41:46) Compatible May LLVM 4.2
Python 2.7.5 (default,Apple20 2013,
(clang-425.0.28)] on Apple
[GCC 4.2.1
23:41:46) Compatibledarwin LLVM 4.2
Type "help", "copyright", "credits"
(clang-425.0.28)] on Apple
[GCC 4.2.1 Compatibledarwin LLVM 4.2or
"license" for more information.
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
>>>
"license" for more information.
Type1"help",3"copyright", "credits" or
+ 2 +
6
>>> 1 + 2 + 3
"license" for more information.
6
>>> “Hello+World”
1 + 2
3
‘Hello World’
>>> “Hello World”
6
‘Hello=World’
>>> “Hello World”
x
100
>>> x
‘Hello=World’
y
200
100
>>> x = y
y + 100
200
67. Interactive Shell
(clang-425.0.28)] on darwin
23:41:46)
Python 2.7.5 (default, May 20 2013,
$ python
Type "help", "copyright",
[GCC 4.2.1
23:41:46) Compatible May"credits"
Python 2.7.5 (default,Apple20 2013, or
LLVM 4.2
"license"
(clang-425.0.28)] information.
[GCC 4.2.1 Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
>>>
Type "help",3"copyright", "credits"
(clang-425.0.28)] on Apple
[GCC14.2.1+Compatibledarwin LLVM 4.2or
+ 2
6
"license" for more information.
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
+ 2
‘Hello 2 + 3
6
>>> 1 +World’
"license" for more information.
6
>>> “Hello+World”
x + 2
1 = 100 3
‘Hello=World’
>>> “Hello World”
6
y
200
‘Hello=World’
>>> “Hello World”
x + y
100
300 y
>>> x
‘Hello=World’
200
100
>>> x = y
y + 100
200
68. Interactive Shell
(clang-425.0.28)] on darwin
23:41:46)
Python 2.7.5 (default, May 20 2013,
$ python
Type "help", "copyright",
[GCC 4.2.1
23:41:46) Compatible May"credits"
Python 2.7.5 (default,Apple20 2013, or
LLVM 4.2
"license"
(clang-425.0.28)] information.
[GCC 4.2.1 Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
>>>
Type "help",3"copyright", "credits"
(clang-425.0.28)] on Apple
[GCC14.2.1+Compatibledarwin LLVM 4.2or
+ 2
6
"license" for more information.
Type "help", "copyright", "credits" or
(clang-425.0.28)] on darwin
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
+ 2
‘Hello 2 + 3
6
>>> 1 +World’
"license" for more information.
6
>>> “Hello+World”
x + 2
1 = 100 3
‘Hello=World’
>>> “Hello World”
6
y
200
‘Hello=World’
>>> “Hello World”
x + y
100
300 y
>>> x
‘Hello=World’
200
100
>>> for y in range(5):
y + 100
x = i
200
69. Interactive Shell
Type "help", "copyright",
(clang-425.0.28)] on darwin20 2013,
23:41:46)
Python 2.7.5 (default, May"credits" or
$ python
"license"
Type "help", more information.
[GCC 4.2.1 Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python 2.7.5 (default,Apple20 2013, or
>>>
"license"
(clang-425.0.28)] information.
[GCC14.2.1+Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
+ 2
3
6
>>>
Type "help",3"copyright", "credits"
(clang-425.0.28)] on Apple
[GCC14.2.1+Compatibledarwin LLVM 4.2or
+ 2
>>> "help", more
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
‘Hello+World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
2
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
x
2 +
6
>>> “Hello+World”
y
x + 200
1 = 100 3
2
‘Hello=World’
>>> “Hello World”
6
x
y + y
200
300 x + y
‘Hello=World’
>>> “Hello World”
100
300 x
>>> for i in
‘Hello=World’range(5):
y
200
100
... x = i
>>> for y in range(5):
y + 100
200
70. Interactive Shell
Type "help", "copyright",
(clang-425.0.28)] on darwin20 2013,
23:41:46)
Python 2.7.5 (default, May"credits" or
$ python
"license"
Type "help", more information.
[GCC 4.2.1 Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python 2.7.5 (default,Apple20 2013, or
>>>
"license"
(clang-425.0.28)] information.
[GCC14.2.1+Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
+ 2
3
6
>>>
Type "help",3"copyright", "credits"
(clang-425.0.28)] on Apple
[GCC14.2.1+Compatibledarwin LLVM 4.2or
+ 2
>>> "help", more
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
‘Hello+World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
2
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
x
2 +
6
>>> “Hello+World”
y
x + 200
1 = 100 3
2
‘Hello=World’
>>> “Hello World”
6
x
y + y
200
300 x + y
‘Hello=World’
>>> “Hello World”
100
300 x
>>> for i in
‘Hello=World’range(5):
y
200
100
... x = y in i
>>> for printrange(5):
y + i
200
100
71. Interactive Shell
"license"
Type "help", more information.
(clang-425.0.28)] on darwin
23:41:46)
Python 2.7.5 "copyright", 20 2013,
$ python for(default, May"credits" or
>>>
"license"
Type "help", more information.
[GCC14.2.1+Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python+2.7.53(default,Apple20 2013, or
2
6
>>>
"license"
(clang-425.0.28)] information.
[GCC14.2.1+Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
+ 2
3
6
>>> "help",3"copyright", "credits"
Type14.2.1 Compatible Apple
(clang-425.0.28)]
[GCC“Hello+World” on darwin LLVM 4.2or
+ 2
‘Hello World’
>>> "help", more
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
‘Hello=World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
x + 100
2
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
y
x
200
2 +
6
>>> “Hello+World”
y
x + 100 3
1 = y
200
2
300 y + y
‘Hello=World’
>>> “Hello World”
6
x
200
300 for y World”
‘Hello=World’
>>> “Helloin range(5):
x + i
100
... y
300 x
>>> for print i
‘Hello=World’range(5):
i in
200
100
... x = y in i
>>> for printrange(5):
y + i
200
100
72. Interactive Shell
>>>
"license"
Typey"help",
(clang-425.0.28)] information.
23:41:46) for moreon darwin
Python=2.7.5 "copyright", 20 2013,
$ python200 (default, May"credits" or
>>>
"license"
Typex"help", more information.
[GCC14.2.1+Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python+2.7.53(default,Apple20 2013, or
y
2
300
6
>>>
"license"
(clang-425.0.28)] information.
[GCC14.2.1+Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
+ 2
3
6
>>> 14.2.1 Compatible
Typefor i +World”
(clang-425.0.28)] on darwin
[GCC“Helloin3range(5):Apple LLVM 4.2or
"help", "copyright", "credits"
+ 2
...
‘Hello World’ more
>>> "help", i
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
print
... x + 100
‘Hello=World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
2
0
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
y
x
200
2 +
1
6
>>> “Hello+World”
y
x + 100 3
1 = y
200
2
2
300 y + y
‘Hello=World’
>>> “Hello World”
6
x
200
3
300 for y World”
‘Hello=World’
>>> “Helloin range(5):
x + i
100
4
... y
300 x
>>> for print i
‘Hello=World’range(5):
i in
200
100
... x = y in i
>>> for printrange(5):
y + i
200
100
73. Interactive Shell
>>>
"license"
Typey"help",
(clang-425.0.28)] information.
23:41:46) for moreon darwin
Python=2.7.5 "copyright", 20 2013,
$ python200 (default, May"credits" or
>>>
"license"
Typex"help", more information.
[GCC14.2.1+Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python+2.7.53(default,Apple20 2013, or
y
2
300
6
>>>
"license"
(clang-425.0.28)] information.
[GCC14.2.1+Compatible Apple
23:41:46) for moreon darwin LLVM 4.2
+ 2
3
6
>>> 14.2.1 Compatible
Typefor i +World”
(clang-425.0.28)] on darwin
[GCC“Helloin3range(5):Apple LLVM 4.2or
"help", "copyright", "credits"
+ 2
...
‘Hello World’ more
>>> "help", i
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
print
... x + 100
‘Hello=World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
2
0
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
y
x
200
2 +
1
6
>>> “Hello+World”
y
x + 100 3
1 = y
200
2
2
300 y + y
‘Hello=World’
>>> “Hello World”
6
x
200
3
300 for y World”
‘Hello=World’
>>> “Helloin range(5):
x + i
100
4
... y
300 x
>>> for print i
‘Hello=World’range(5):
i in
200
100
... x = y in i
>>> for printrange(5):
exit()
y + i
200
100
74. Interactive Shell
>>> x + 200
"license"
Typey"help", more information.
(clang-425.0.28)] on darwin
23:41:46)
Python=2.7.5 "copyright", 20 2013,
$ pythony for(default, May"credits" or
300
>>>
"license"
Typex"help", more information.
[GCC14.2.1+Compatible May LLVM 4.2
23:41:46) for"copyright", "credits"
Python+2.7.53(default,Apple20 2013, or
y
2
300
6
>>> 14.2.1
"license" +Compatible
(clang-425.0.28)] information.
[GCCfor i for moreon darwin
23:41:46) in3range(5):Apple LLVM 4.2
+ 2
... "help", i
6
>>> 14.2.1+World”
Typefor print"copyright", "credits"
(clang-425.0.28)] on darwin
[GCC“Helloin3range(5):Apple LLVM 4.2or
+ i Compatible
2
...
‘Hello World’ more
>>> "help", i
6
"license" World” information.
Type“Hellofor"copyright", "credits" or
(clang-425.0.28)] on darwin
print
0
... x + 100
‘Hello=World’
>>> 1"help",3 more
"license" +World” information.
Type“Hellofor"copyright", "credits" or
2
1
0
‘Hello+ 100 3
6
>>> 1 =World’
"license" for more information.
y
x
200
2 +
2
1
6
>>> “Hello+World”
y
x + 100 3
1 = y
200
2
3
2
300 y + y
‘Hello=World’
>>> “Hello World”
6
x
200
4
3
300 for y World”
‘Hello=World’
>>> “Helloin range(5):
x + i
100
4
... y
300 x
>>> for print i
‘Hello=World’range(5):
exit()in
i
200
100
$
... x = y in i
>>> for printrange(5):
exit()
y + i
200
100
81. A Python Code
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
9x9table.py
82. script language
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
no specified entry point
86. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
87. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
88. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
and write all statements after it.
89. variable
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
can be used without declaration
90. variable
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
can be used without declaration
91. scope
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
use whitespace to identify scope
92. scope
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
use whitespace to identify scope
166. Cross-line String
Contents are
surrounded by
three single
quotes or three
double quotes.
>>> “““Hello
... World!”””
‘HellonWorld!’
>>> x = “““Hello
... World!”””
>>>
167. Cross-line String
Contents are
surrounded by
three single
quotes or three
double quotes.
>>> “““Hello
... World!”””
‘HellonWorld!’
>>> x = “““Hello
... World!”””
>>> print x
168. Cross-line String
Contents are
surrounded by
three single
quotes or three
double quotes.
... World!”””
>>> “““Hello
‘HellonWorld!’
... World!”””
>>> x = “““Hello
‘HellonWorld!’
... x = “““Hello
>>> World!”””
>>> print x
... World!”””
Hello
>>> print x
World!
>>>
369. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
370. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
371. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
372. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
...
373. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
...
continue
374. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
...
continue
...
375. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
...
continue
...
print i
376. Addition for Loop
skip remaining statement and
continue
continue loop
>>> for i in range(5):
...
if i == 2:
...
continue
...
print i
...
377. Addition for Loop
skip remaining statement and
continue
continue loop
...
>>> for ifin range(5):
i i == 2:
...
if icontinue
== 2:
...
print i
continue
...
print i
0
...
1
3
4
>>>
393. Addition for Loop
else
do something after unbroken
loop
>>> for i in range(3):
...
print i
... else:
394. Addition for Loop
else
do something after unbroken
loop
>>> for i in range(3):
...
print i
... else:
...
395. Addition for Loop
else
do something after unbroken
loop
>>> for i in range(3):
...
print i
... else:
...
print “done”
396. Addition for Loop
else
do something after unbroken
loop
>>> for i in range(3):
...
print i
... else:
...
print “done”
...
397. Addition for Loop
else
do something after unbroken
loop
...
>>> for i in range(3):
print i
... else:
print i
... else:
print “done”
...
print “done”
0
...
1
2
done
>>>