Based on Zed Shaw's "Learn Python the Hard Way," this is a review of Exercises 1 - 12 in that text. For non-computer-science students and learners. Updated with new slides Jan. 12, 2014. Introduces math, print statement, variables, format strings, raw_input().
Based on Zed Shaw's "Learn Python the Hard Way," this is a review of Exercises 27 - 34 in that text. For non-computer-science students and learners. Updated with new slides Feb. 2, 2014. Introduces Booleans, if-elif-else, loops, lists.
Based on Zed Shaw's "Learn Python the Hard Way," this is a review of Exercises 13 - 19 in that text. For non-computer-science students and learners. This PPT will not make sense without Zed's lessons. The PPT is intended to supplement and help explain these seven lessons. The PPT was updated on Jan. 17, 2014.
LESSON 3B. FOCUS: FOR LOOPS, NESTED LOOPS, TASKS AND CHALLENGES.
Introduction to, with examples, For loops. Challenges and tasks included with solutions (predict the output). Compare ‘while’ and ‘for’ loops. Use the break statement and explore how it works in different scenarios. Learn about Nested Loops. Learn about the need for initialisation (set starting value). Create your own for loops. Create the beginnings of an arithmetic quiz using a random function and for loops. Big ideas discussion: Is the universe digital. A program? Introducing Gottfried Leibniz and Konrad Zuse. Includes a suggested videos, ‘Big ideas’ discussion, and HW/research projects section.
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptxAbhimanyuChaure
This is a slide of c programming language which is taught at Indian Institute of technology kanpur in first year first semester under the bachelor of technology or bachelor of science program.
(More info and video at fsharpforfunandprofit.com/fourfromforty)
The 1970's were a golden age for new programming languages, but do they have any relevance to programming today? Can we still learn from them?
In this talk, we'll look at four languages designed over forty years ago -- SQL, Prolog, ML, and Smalltalk -- and discuss their philosophy and approach to programming, which is very different from most popular languages today.
We'll come away with some practical principles that are still very applicable to modern development. And you might discover your new favorite programming paradigm!
Based on Zed Shaw's "Learn Python the Hard Way," this is a review of Exercises 27 - 34 in that text. For non-computer-science students and learners. Updated with new slides Feb. 2, 2014. Introduces Booleans, if-elif-else, loops, lists.
Based on Zed Shaw's "Learn Python the Hard Way," this is a review of Exercises 13 - 19 in that text. For non-computer-science students and learners. This PPT will not make sense without Zed's lessons. The PPT is intended to supplement and help explain these seven lessons. The PPT was updated on Jan. 17, 2014.
LESSON 3B. FOCUS: FOR LOOPS, NESTED LOOPS, TASKS AND CHALLENGES.
Introduction to, with examples, For loops. Challenges and tasks included with solutions (predict the output). Compare ‘while’ and ‘for’ loops. Use the break statement and explore how it works in different scenarios. Learn about Nested Loops. Learn about the need for initialisation (set starting value). Create your own for loops. Create the beginnings of an arithmetic quiz using a random function and for loops. Big ideas discussion: Is the universe digital. A program? Introducing Gottfried Leibniz and Konrad Zuse. Includes a suggested videos, ‘Big ideas’ discussion, and HW/research projects section.
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptxAbhimanyuChaure
This is a slide of c programming language which is taught at Indian Institute of technology kanpur in first year first semester under the bachelor of technology or bachelor of science program.
(More info and video at fsharpforfunandprofit.com/fourfromforty)
The 1970's were a golden age for new programming languages, but do they have any relevance to programming today? Can we still learn from them?
In this talk, we'll look at four languages designed over forty years ago -- SQL, Prolog, ML, and Smalltalk -- and discuss their philosophy and approach to programming, which is very different from most popular languages today.
We'll come away with some practical principles that are still very applicable to modern development. And you might discover your new favorite programming paradigm!
These are the hand-curated and well researched 50 questions you are most likely to be asked during the coding interview.
Whether you are appearing for a Java Interview, CS Interview, C/C++ Interview, or any other Coding interview you will be certainly asked some of the questions from the list.
You can prepare their answer, solve them using the choice of your programming language and you can also check your readiness to face the coding interview using MockRabbit app.
The NLP/AI/ML powered app will throw these questions to you and analyse your answers to tell you instantly about how better you are prepared to answer these questions.
The regular mock practice of interview question will help you gain the confidence needed to crack the coding interview.
Download MockRabbit app here: https://goo.gl/8PNNtn
Introduces the idea of "Just Enough Code" -- to add a 2- or 3-week module on Web coding into courses like editing, or design, or multimedia. There are 2 reasons to do this. One is to demystify how Web and mobile sites are made. The other is to open a door -- for (at least) some students -- to something they might really have an aptitude for, something they might really enjoy, if you just have a chance to explore it.
Multimedia Journalism Innovations in the ClassroomMindy McAdams
For a panel about "Innovation in Journalism Education": How teaching multimedia journalism has changed since 1999, and how I have adapted my classes and pushed my department to innovate. Journalism students don't have to be programmers, but they should have an opportunity to learn how to create new story forms for web and mobile platforms.
These are the hand-curated and well researched 50 questions you are most likely to be asked during the coding interview.
Whether you are appearing for a Java Interview, CS Interview, C/C++ Interview, or any other Coding interview you will be certainly asked some of the questions from the list.
You can prepare their answer, solve them using the choice of your programming language and you can also check your readiness to face the coding interview using MockRabbit app.
The NLP/AI/ML powered app will throw these questions to you and analyse your answers to tell you instantly about how better you are prepared to answer these questions.
The regular mock practice of interview question will help you gain the confidence needed to crack the coding interview.
Download MockRabbit app here: https://goo.gl/8PNNtn
Introduces the idea of "Just Enough Code" -- to add a 2- or 3-week module on Web coding into courses like editing, or design, or multimedia. There are 2 reasons to do this. One is to demystify how Web and mobile sites are made. The other is to open a door -- for (at least) some students -- to something they might really have an aptitude for, something they might really enjoy, if you just have a chance to explore it.
Multimedia Journalism Innovations in the ClassroomMindy McAdams
For a panel about "Innovation in Journalism Education": How teaching multimedia journalism has changed since 1999, and how I have adapted my classes and pushed my department to innovate. Journalism students don't have to be programmers, but they should have an opportunity to learn how to create new story forms for web and mobile platforms.
Summary of journalism faculty curriculum workshopMindy McAdams
At the end of a week-long workshop about updating the journalism curriculum at Rhodes University, we discussed a few specific types of assignments and assessment.
Introduction to crowdsourcing for journalists and journalism educators. Use of four cases and what we can learn from them. Three cases include maps; the fourth case does not.
Presentation about curriculum and required courses in journalism programs in the U.S. To lecturers at Rhodes dept. of Journalism and Media Studies, South Africa, June 2014.
Starter presentation in a weeklong workshop for journalism educators at Rhodes University, South Africa, in June 2014. We are trying to discover the needs of the journalism school as it goes forward with changes and updates in the curriculum. Purpose of this pres is to identify some areas where teaching needs to be focused, or refocused.
Blogs cover a very wide variety of styles and approaches. Blogs written by journalists, or housed on the websites of media organizations, are also widely varied. To understand blogs, blogging, and the audiences for blogs, we have to begin by looking at real blogs and comparing them. This presentation was given to 3rd-year journalism students at Rhodes University, South Africa.
Journalism's Future: Journalism, Not NewspapersMindy McAdams
Presentation to 150 journalists and editors at RCS MediaGroup S.p.A., Milan, Italy, May 2013. The goal was to inspire them to take their business forward into a mobile environment where competition comes from everywhere, not only the traditional rivals.
A university lecture for journalism students -- how to use the canvas element to add graphics and animation to Web pages. Updated April 2014. Basics for beginners. See also https://github.com/macloo/canvas
Updated with new exercises - March 2014. Introduction to jQuery (for journalism students) and review of the Code School "Try jQuery" course, Parts 1-3.
If you are using jQuery, you need to understand the Document Object Model and how it accounts for all the elements inside any HTML document or Web page.
An introduction to JavaScript that includes side-by-side comparisons with Python -- for journalism students. Based on the free JavaScript exercises/lessons at Codecademy: http://www.codecademy.com/tracks/javascript (Students in this course spent 4 weeks learning Python before they were introduced to JavaScript.)
An introduction to responsive design and Web frameworks -- for journalism students. Shows various examples. Includes links to resources. Updated February 2014.
Updated Feb. 9, 2014. This PPT is a review of color and fonts as used with HTML5 and CSS. Used in an undergraduate journalism class called Advanced Online Media Production.
Brief introduction to the Python programming language, for complete beginners who have never learned a programming language before. Resources and links are included.
From a one-hour webinar about digital storytelling. Audience: Fulbright and other U.S. State Department alumni. Date: October 19, 2012. Sponsor: https://conx.state.gov/
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.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
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?
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
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.
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.
1. Learn Python the Hard Way
Exercises 1 – 12
http://learnpythonthehardway.org/
2. Exercise 1: Quotation marks
Which of these will throw an error?
a)
b)
c)
d)
print "They wouldn't do that."
print 'They wouldn't do that.'
print 'They wouldn't do that.'
print "They wouldn't do that.'
3. Exercise 2: Comments
Which line is commented out?
a) print "Fourscore and seven years"
b) # print "Fourscore"
c) print "Eighty years" # this is fourscore years
4. Which one will print blank lines?
1) print "Fourscore and seven years ago"
#
#
print "Our fathers brought forth"
2) print "Fourscore and seven years ago"
print
print
print "Our fathers brought forth"
5. Exercise 3: Math
Which one of these would give a different
answer than the others?
a)
b)
c)
d)
e)
4+6/3+5
4 + (6 / 3) + 5
(4 + 6) / 3 + 5
(4 + 6 / 3) + 5
4 + (6 / 3 + 5)
7. PEMDAS is not the whole story
•P ()
• E exponents, e.g. 10**2
• MD * / %
• AS + –
See http://en.wikipedia.org/wiki/Order_of_operations
8. Exercise 4: Math
What is the answer Python will give to all of
these?
a)
b)
c)
d)
5 > 10
10 < 2
1444 < 1443
1>2
9. Exercise 4: Math
True or False:
<
>
<=
>=
==
!=
More about True and False to come, in Zed’s
exercise 27.
(Note: In Python, these values always start with
an uppercase letter.)
10. Exercise 5: Integers and floats
What is the answer Python will give to this?
1/4
11. Exercise 5: Integers and floats
What is the answer Python will give to this?
1 / 4.0
14. Exercise 6: Modulus
What is the answer Python will give to all of
these?
a)
b)
c)
d)
4%2
10 % 2
144 % 12
100 % 25
15. Modulo
The modulus operand is commonly used to find out if a
number is odd or even.
%
Don’t get confused: In Python, the percent sign (yes,
the same character, but used differently) is also used
for format strings, as seen first in Exercise 5. (You’ll be
seeing even more of that!)
27. “Format strings”
• %s %d %r %f
• Each one is slightly different
• They are a kind of shorthand for working with
variables in Python
• NOTE! These are NOT variables!
• Zed also calls these “format characters”
• NOTE! This is NOT modulus!
29. Notice how %r in this case returns
something very different from %s
30. String formatting continued
•
•
•
•
%s string: use this for text
%d use this for integers (no decimal places)
%f float: shows up to 6 decimal places
%r representation: works for numbers and
strings, but (usually) adds quotation marks *
* Zed says, “The %r is best for debugging.”
(But you don’t really know what debugging is.)
31. The value of “play”
(an essential part of learning to code)
32. n newline (line break)
t tab (indent)
The backslash is
“the escape character.”
33. Putting things together
a = "Mary had a little lamb."
b = "Its fleece was white as snow."
c = "And everywhere that Mary went"
d = "The lamb was sure to go."
print "nn%snt%sn%snt%snn" % (a, b, c, d)
What would happen if the order were changed to: (d, c, b, a)
40. Learn Python the Hard Way
Exercises 1 – 12
(we’re just getting started)
Editor's Notes
SOURCE http://learnpythonthehardway.org/book/
ANSWER: b and d Quotation marks. NOTE: c is okay because it includes an escape character: \’ (It is DIFFERENT from b for that reason.)
ANSWER: b C has part of the line commented out. In b, the complete line is commented out.
Related to making comments. The second example will print two blank lines. The top example prints NO blank lines.
ANSWER: c Because addition would not be done first, otherwise. Only in c will the addition be done first.
PEMDAS is a mnemonic, but it doesn’t include modulo! (not explicitly)
See table at bottom - http://en.wikipedia.org/wiki/Order_of_operationsPython is NOT the only language that follows PEMDAS.
ANSWER: False (with a capital F)
ANSWER: 0 (see next slide)
ANSWER: 0.25 Floating point.
Floats vs. integers. Floats have decimals and integers do not.
CODE EXAMPLE. Floats and integers. TRY THIS YOURSELF.
ANSWER: 0, because there is no remainder for any of them Modulus.
“In computing, the modulo (sometimes called modulus) operation finds the remainder of division of one number by another.” http://en.wikipedia.org/wiki/Modulo_operation
ANSWER: 5 (the remainder) But see - http://forums.udacity.com/questions/1001665/python-help-with-modulus Example: - 7 % 5 -> 3 but 7 % 5 -> 2
(Exercise 4 LPTHW) Variables consist of two things, a name and a value.
I think of variables as containers. They can hold all kinds of values. You can name them almost anything.
The name is used in our code to represent the contents – but the contents (the value) can change.
CODE EXAMPLE. Changing the value of some variables.
Again: Variables consist of two things, a name and a value.
Thevalue. can change, while the name stays the same.
Thevalue. can change, while the name stays the same.
Thevalue. can change, while the name stays the same.
CODE EXAMPLE. Any questions? TRY THIS YOURSELF.
Also called formatters (“short abbreviated variable names”) – Zed introduces these in exercise 5.
CODE EXAMPLE. Each one has different abilities. Play with these yourself until you understand them.
CODE EXAMPLE. Best example I have seen of how %r produces a different result from %s or %d or %f.
http://docs.python.org/2/library/stdtypes.html#string-formattingIntegers are negative or positive numbers without decimals or fractions.
Playing with code at the command line – and writing lines in your program for which you don’t know how they will come out – this is a big part of how we learn.
CODE EXAMPLE. Playing with escape characters: \n and \t
Same thing, just with color added. Note that each of these four variables contains a string. Therefore, the format character is %s for each one.
Check out how the ”triple double-quotes” and the ”triple single-quotes” work. TRY THEM OUT.
CODE EXAMPLE. Notice that the \n added an extra line for each line – the way it was typed, each line would have broken at the end anyway.
LPTHW Exercise 10 – memorize\n and \\ and \’ -- it’s enough.
CODE EXAMPLE. Demonstrating \n and \\ and \"
Zed’s exercises 11 and 12 introduce this.
CODE EXAMPLE. LPTHW Exercises 11 and 12 – use of raw_input () to accept typing from the user while the program is running.