David Kent Director VOLSHOP (official bookstore) U of Tennessee, Knoxville
Lisa Kiefer, Managing Director Wakefield ResearchCindy Clarke Vice President Marketing, Vital Source Technologies
students want formally taught life skills: interview for a job, balance checkbook and do taxes, how to take out and pay for student loans
Tennessee:
traditional 4 year school. cost is part of the program, not charged as a course fee. all materials avaiable first day of school and available in perpetuity. way below rental books prices. via LMS (BB). no printed textbooks. few books through websites, for books, which do not subscribe for the program. ebooks offered at the store. increasing titles selection. cost, learning outcomes. the outlook for digital in the future: already digital, but open for further development. expand courses offered, launching more programs with materials bundled and online course.
digital is easier to work with, deliver to customer,
business partnership (this is different now from https://blog.stcloudstate.edu/ims/2015/07/29/mn-esummit-2015/ David Wiley, MN Learning Commons). working closely with provost, cio, vital source. working with publishers to make sure that content is available>
business model: program bundle all the content and deliver to students and advertise periodically to students
the course fee model: charged to student account semester by semester bases. also student-paid method. all access model is better for everyone.
ebooks are important for the interactivity, collaboration
Q and As:
what was the students’ reaction moving to digital books. how traditional faculty are accepting the change. A: pilot group of several faculty and gradual roll out. early adopters influencing others.
does the content open on all devices? A: yes, device-agnostic. dedicated apps for iOS, Android, and Windows
disability? A: enhanced apps, migrate all PDF format to proprietory platform. epub and PDF content. user added epub content. Center for accessible material innovation, American Foundation for the blind, Tech for All etc
libraries do not provide course materials for students. clean division between campus store and library
BB admin is loading the codes in the LMS, but the idea is to load the information straight into BB. cio in charge. helpdesk support for vital provided by the cio department.
cost savings in percent for students digital to print. student pay model, ebooks can vary to new book price. ebooks even more expensive. with the course fee, 70% off rental. 3rd party operator may add 30%. all parties must be looking for reasonable margin. greater digital adoption results in lower costs for students.
digital alleviates dropout rate.
what course which don’t fit digital materials. life sciences and mathematics, science and engineering is landing itself well
how much interactive content and links to social media is incorporated.
Educational Intelligence and the Student Lifecycle – Leveraging Predictive Analytics for Profit in Higher Education
This presentation will begin on Wednesday, August 12, 2015 at 02:00 PM Eastern Daylight Time.
Wednesday, August 12, 2015 02:00 PM EDT
This webinar will provide an overview of the student lifecycle – from lead generation to job placement. You will learn what the components are and how student data can be leveraged for competitive gain through the use of predictive analytics tools. While these technologies have been in use by other industries for many years, especially in the area of assessing consumer demand, higher education is a relatively late adopter. As an example of benefit, colleges and universities can deploy them to determine which students are most at risk for attrition and – armed with deep, historical data – craft segment-specific retention strategies designed to compel them to persist toward degree completion. During this session, Eduventures analysts will provide concrete examples of how predictive analytics has been used within the student lifecycle at a variety of institutions, citing interviews with practitioners, that led to measurable performance improvements. To conclude, we will uncover the benefits of sharing data amongst key stakeholders to the ultimate gain of the institution and its constituents.
Speakers:
Jeff Alderson
Principal Analyst
Max Woolf
Senior Analyst
Audience members may arrive 15 minutes in advance of this time.
Experience explore expand. Adventure based how to collaborate in ways we have not collaborated before pedagogical guidelines internet driven
Instructor – content – design
Today: first think is design, content, instructor. So how do we design learning environments is the most important one
Guide learners as designers. Constructivism. Design for meaning. Through the power of the story.
Geotetic design a learning environment learn geography using GIS
Situated movies (student-centered learning)
Grant Earthducation go to the most remote parts of the world to align their education with their culture, instead of what the government is downing as culture
Use of phone: whoever answers instructor’s question first, gets to pose the next question to the rest of the audience.
Design based research
Self-narrative, referencing the experience real world issues in real time
the U Media Lab.
The Changing Earth. App GoX (instagram on steroids. tell their story through the app). How is this different from Google Earth
Raptor Lab (rehabilitate a raptor).
podcast pontification (audio version of blog self reflections)
Greg Steinke The U
A Digital Story Assignment using WeVideo
WeVideo is the Google response to iMovie cloud
The U is on Google email and thus google drive and all other google tools
The Center for Digital Storytelling. short videos, 3-5 min incorporate photographs with the author narration, reflection
Assignment (verbal directions). process (write a 2 page script, every page is about a minute of video), gather images that support the story; edit the script (rewrite); record audio to the script (use an app on the phone instead of WeVideo), WeVideo can edit the audio recording; edit the story, edit the photos to match the story; YourTube and/or Google+
working with faculty: is the digital story a good fit for your course? two questions: does the course have many writing assignments? does everyone have to do the same type of assignment? do you want to offer choices? do you want your students to share their work outside of the class? to you want to explore opportunities for students to develop 21 century skills?
google communities for sharing
wewideo has a tutorial at Center for Digital Storytelling
students can use the digital story for their eportfolio
the entire exercise is entirely based on mobile devices
time frame: scaffolding options
3d printing products were the tangible result of the project and the digital storytelling just the format to present
Google Drive master folder for the phone images and video; iOS apps: MoviePro, FiLMc Pro, VoiceRecord Pro (including mp3); Android: WeVideo
Storyboard template
Faculty Development Programs: Digital Storytelling Community of Practice
chemistry professor. 3D printing with different materials.
what else can be made (e.g. reaction vessel)
printing of atoms
crystalography dbase
Karen: pre-service teachers professor: how to use 3d printers and be comfortable with them. Steve Hoover. Thinkercad and Autodesk123D>
3D academy http://www.team3dacademy.com/index2.html. Pinterest board for3d Printing with resources
Lisa: graphic design. not intuitive. Rhinoceros (not free anymore). 123D strong learning curve. 3d printing will be incorporated in the curriculum. sculpture students and others don’t like fudging on the computer, but Adobe people love it. Some items takes up to 4 hours to print out. when working on the computer is difficult for some students to visualize the dimensionality.
collaborative learning opportunities.
no makerspace or fab lab. additional interest from the theater and business dept. 3d printing is connected to future work skills. new media ecology or media literacy set of skills.
the main presenter: build excitement and interest and gradually step back. how much material goes through and should we charge back. clean and maintenance involved; not too bad. better then a copier. plastic inexpensive. sizes with plastic – $25 and $50. how many project of a spool: depending on the size of the projects but considerable amount. two printers one art dept and one in the faculty dev area.
non profit visually impaired students. how 3d can make difference in special ed.
3d printing lab with access for everybody. ownership brings policy. where housed: neutral place.
only one printer is barely sufficient for faculty to figure out how to use it. purchasing two more if students and curricula to be involved.
The Balancing Act: Team-Creating an eBook as an Alternative Method for Content Delivery Tom Nechodomu, University of Minnesota
Susan Andre uses a slide titled “trust” to elucidate how the entire project was enabled. “trust” and “transparency” are sparse currency in the environment I work in. if she is right an ebook ain’t happening anytime soon at my place.
inclining habitat.
students involvement. use stipends. student artists. food for the video interviews. create a community, student centered.
people able to change the book.
copyright process; did you find it cumbersome. copyright permission center.
time span and amount of hours spent: 3-4 months per chapter.
Main speaker
David Wiley. Making Teaching and Learning Awesome with Open
MN Learning Commons
open educational resources
LUMEN
education – sharing feedback, encouragement with students passion about the discipline, yourself
open is not the same as free. free + permissions + copyright permission: 5 r = retain (make and own copies), reuse (use in a wide range of ways), revise (adapt, modify, and improve), remix (combine two or more), redistribute (share with others)
open:
free and unfettered access
perpetual, irrevocable copyright permissions
(look but don’t touch is not open)
tech enables OER permits
traditionally copyright materials on the Internet – not so good ; jet on the road
openly copyright materials on the internet _ yes: jet in the air
permission-less innovation. relatively inexpensive and broad permissions.
intellectual infrastructure of education: learning outcomes/objectives; assessments; textbooks. they are relatively expensive and narrow permissions.
so what?
open education infrastructure: open outcomes, objectives, activities, educational resources
the culture of glued legos must be eradicated. open pedagogy. open credentialing model
Crompton, Muilenburg and Berge’s definition for m-learning is “learning across multiple contexts, through social and content interactions, using personal electronic devices.”
The “context”in this definition encompasses m-learnng that is formalself-directed, and spontaneous learning, as well as learning that is context aware and context neutral.
therefore, m-learning can occur inside or outside the classroom, participating in a formal lesson on a mobile device; it can be self-directed, as a person determines his or her own approach to satisfy a learning goal; or spontaneous learning, as a person can use the devices to look up something that has just prompted an interest (Crompton, 2013, p. 83). (Gaming article Tallinn)Constructivist Learnings in the 1980s – Following Piage’s (1929), Brunner’s (1996) and Jonassen’s (1999) educational philosophies, constructivists proffer that knowledge acquisition develops through interactions with the environment. (p. 85). The computer was no longer a conduit for the presentation of information: it was a tool for the active manipulation of that information” (Naismith, Lonsdale, Vavoula, & Sharples, 2004, p. 12)Constructionist Learning in the 1980s – Constructionism differed from constructivism as Papert (1980) posited an additional component to constructivism: students learned best when they were actively involved in constructing social objects. The tutee position. Teaching the computer to perform tasks.Problem-Based learning in the 1990s – In the PBL, students often worked in small groups of five or six to pool knowledge and resources to solve problems. Launched the sociocultural revolution, focusing on learning in out of school contexts and the acquisition of knowledge through social interaction
Socio-Constructivist Learning in the 1990s. SCL believe that social and individual processes are independent in the co-construction of knowledge (Sullivan-Palinscar, 1998; Vygotsky, 1978).
96-97). Keegan (2002) believed that e-learning was distance learning, which has been converted to e-learning through the use of technologies such as the WWW. Which electronic media and tools constituted e-learning: e.g., did it matter if the learning took place through a networked technology, or was it simply learning with an electronic device?
99-100. Traxler (2011) described five ways in which m-learning offers new learning opportunities: 1. Contingent learning, allowing learners to respond and react to the environment and changing experiences; 2. Situated learning, in which learning takes place in the surroundings applicable to the learning; 3. Authentic learning;
Diel, W. (2013). M-Learning as a subfield of open and distance education. In: Berge and Muilenburg (Eds.). Handbook of Mobile Learning.
15) Historical context in relation to the field of distance education (embedded librarian)
16 definition of independent study (workshop on mlearning and distance education
17. Theory of transactional distance (Moore)
Cochrane, T. (2013). A Summary and Critique of M-Learning Research and Practice. In: Berge and Muilenburg (Eds.). Handbook of Mobile Learning.
( Galin class, workshop)
P 24
According to Cook and Sharples (2010) the development of M learning research has been characterized by three general faces a focus upon Devices Focus on learning outside the classroom He focus on the mobility of the learner
25
Baby I am learning studies focus upon content delivery for small screen devices and the PDA capabilities of mobile devices rather than leveraging the potential of mobile devices for collaborative learning as recommended by hope Joyner Mill Road and sharp P. 26 Large scale am learning project Several larger am learning projects have tended to focus on specific groups of learners rather than developing pedagogical strategies for the integration of am mlearning with him tertiary education in general
27
m learning research funding
In comparison am learning research projects in countries with smaller population sizes such as Australia and New Zealand are typiclly funded on a shoe string budget
28
M-learning research methodologies
I am learning research has been predominantly characterized by short term case studies focused upon The implementation of rapidly changing technologies with early adopters but with little evaluation reflection or emphasis on mainstream tertiary-education integration
p. 29 identifying the gaps in M learning research
lack of explicit underlying pedagogical theory Lack of transferable design frameworks
Pachler, N., Bachmair, B., and Cook, J. (2013). A Sociocultural Ecological Frame for Mobile Learning. In: Berge and Muilenburg (Eds.). Handbook of Mobile Learning.
(Tom video studio)
35 a line of argumentation that defines mobile devices such as mobile phones as cultural resources. Mobile cultural resources emerge within what we call a “bile complex‘, which consist of specifics structures, agency and cultural practices.
36 pedagogy looks for learning in the context of identify formation of learners within a wider societal context However at the beginning of the twentieth first century and economy oriented service function of learning driven by targets and international comparisons has started to occupy education systems and schools within them Dunning 2000 describes the lengthy transformation process from natural assets Land unskilled labor to tangible assets machinery to intangible created assets such as knowledge and information of all kinds Araya and Peters 2010 describe the development of the last 20 years in terms of faces from the post industrial economy to d information economy to the digital economy to the knowledge economy to the creative economy Cultural ecology can refer to the debate about natural resources we argue for a critical debate about the new cultural resources namely mobile devices and the services for us the focus must not be on the exploitation of mobile devices and services for learning but instead on the assimilation of learning with mobiles in informal contacts of everyday life into formal education
37
Ecology comes into being is there exists a reciprocity between perceiver and environment translated to M learning processes this means that there is a reciprocity between the mobile devices in the activity context of everyday life and the formal learning
45
Rather than focusing on the acquisition of knowledge in relation to externally defined notions of relevance increasingly in a market-oriented system individual faces the challenge of shape his/her knowledge out of his/her own sense of his/her world information is material which is selected by individuals to be transformed by them into knowledge to solve a problem in the life world
Crompton, H. (2013). A Sociocultural Ecological Frame for Mobile Learning. In: Berge and Muilenburg (Eds.). Handbook of Mobile Learning.
p. 47 As philosophies and practice move toward learner-centered pedagogies, technology in a parallel move, is now able to provide new affordances to the learner, such as learning that is personalized, contextualized, and unrestricted by temporal and spatial constrains.
The necessity for m-learning to have a theory of its own, describing exactly what makes m-learning unique from conventional, tethered electronic learning and traditional learning.
48 . Definition and devices. Four central constructs. Learning pedagogies, technological devices, context and social interactions.
“learning across multiple contexts, through social and content interactions, using personal electronic devices.”
It is difficult, and ill advisable, to determine specifically which devices should be included in a definition of m-learning, as technologies are constantly being invented or redesigned. (my note against the notion that since D2L is a MnSCU mandated tool, it must be the one and only). One should consider m-learning as the utilization of electronic devices that are easily transported and used anytime and anywhere.
49 e-learning does not have to be networked learning: therefore, e-learnng activities could be used in the classroom setting, as the often are.
Why m-learning needs a different theory beyond e-learning. Conventional e-learning is tethered, in that students are anchored to one place while learning. What sets m-learning apart from conventional e-learning is the very lack of those special and temporal constrains; learning has portability, ubiquitous access and social connectivity.
50 dominant terms for m-learning should include spontaneous, intimate, situated, connected, informal, and personal, whereas conventional e-learning should include the terms computer, multimedia, interactive, hyperlinked, and media-rich environment.
51 Criteria for M-Learning
second consideration is that one must be cognizant of the substantial amount of learning taking place beyond the academic and workplace setting.
52 proposed theories
Activity theory: Vygotsky and Engestroem
Conversation theory: Pask 1975, cybernetic and dialectic framework for how knowledge is constructed. Laurillard (2007) although conversation is common for all forms of learning, m-learning can build in more opportunities for students to have ownership and control over what they are learning through digitally facilitated, location-specific activities.
53 multiple theories;
54 Context is central construct of mobile learning. Traxler (2011) described the role of context in m-learning as “context in the wider context”, as the notion of context becomes progressively richer. This theme fits with Nasimith et al situated theory, which describes the m-learning activities promoting authentic context and culture.
55. Connectivity
unlike e-learning, the learner is not anchored to a set place. it links to Vygotsky’s sociocultural approach.
Learning happens within various social groups and locations, providing a diverse range of connected learning experiences. furthermore, connectivity is without temporal restraints, such as the schedules of educators.
55. Time
m-larning as “learning dispersed in time”
55. personalization
my note student-centered learning
Moura, A., Carvalho, A. (2013). Framework For Mobile Learning Integration Into Educational Contexts. In: Berge and Muilenburg (Eds.). Handbook of Mobile Learning.
I am including a couple whitepapers you can review and forward to all staff who may be curious about our teaching and learning tool and would be attending the demo on May 11th at 1.00pm
Please see the go to meeting instructions for our Bluepulse v1.5 walkthrough.
If you have any questions about the integration, training or implementation, please do not hesitate to email or call and as always I am more than happy to help.
harvest students; feedback – anonymous way to ask questions. D2L surveys offer already this opportunity; Twitter and other the free options for polling apps give the same option, e.g. Polleverywhere gives a word cloud option
the follow up q/n as demonstrated is limited to 160 characters. Why?
i like that it compartmentalize the anonymity but I really ask myself: would SCSU faculty go to such length?
presumptions: non-tenured faculty is interested in the top layers students and wants to find out what works for them best. this loaded, since, if there ARE different learning styles, then what worked for the top layer might be exactly what did not work for the bottom layer, but this approach will gave the faculty a justification to keep stratifying students, instead of thinking of diverse ways to approach all layers. this part of sale, not pedagogy. sorry.
weakness; the entire presentation is trying to sell a product, which might be good for different campus, but not for SCSU, where faculty are overworked, the class load is so great that going to such details might be questionable.
exporting CSV for data massaging is not big deal. indeed the easy of this particular software is admirable, but if the faculty has time to go into such details, they can export the data from D2L or Google Forms and open it in SPSS
Greg’s question: mobility.
libraries and services. pole users without being tied to course. again, that all can be done with other services in the library. if the library cares about it at all.
is an interactive tool that allows participants in a meeting or students in a classroom to share and view documents and notes on the screens of all participating PCs or tablets. Compatible with multiple operating systems such as Windows, Mac OS, Android, and iOS.
More on interactive presentations and wifi presentations in this IMS blog:
From: Robert “Bob” Bilyk [mailto:Robert.Bilyk@LodeStarLearning.com]
I would choose LodeStar if I wanted to do decision-making scenarios or branched interactions that included visuals and, optionally, voice. I would choose LodeStar if I wanted to mash up html presentations with a dozen activity types and have it all come out in an html 5 compliant fashion.
Having written that, LodeStar was redesigned from the ground up on a framework that will allow more media control in the future. The next step for LodeStar 7 is to restore vector graphics editing and the opportunity to link graphics with interactive properties such as assembling machine parts or maps or a science experiment. LodeStar was redesigned on a platform that allows vector graphics to be first class citizens along with components. That work will take another six months. After that, I may revisit the synchronization of visuals with voice-over. We’ll see.
Incidentally, the recent move of LodeStar to a new look and feel has left vestiges of wonkiness with the dialog box fonts. I can see that in your screen capture. The purpose of the audio dialog is simple — but made unclear by the oversized fonts. Currently, you select an audio file to match the page. Currently, because of an IP issue that got resolved for the browser companies, you can select MP3 and it will run everywhere. The purpose of the .wav file was for a fall back. That is no longer necessary. IE, Firefox, Opera, Chrome, and Safari now natively support MP3. The instructor also has the choice of the audio running automatically or displaying a control that enables the student
to start and stop audio. One page, one audio file. Instructors, especially language instructors, use this successfully.
Integers: A signed or unsigned whole number running from -32,768 to 32,768 or from 0 to 65,535 if not signed. Integers are used anytime something needs to be counted.
Long Integer: Any whole number outside the above range. Python doesn’t distinguish between the two though many languages do. Practically, Python’s integers range from −2,147,483,648 to 2,147,483,648 or 0 to 0 to 4,294,967,295. Most of us will be very happy with this many whole numbers to choose from.
Real and Floating Point Numbers: Real numbers are signed or unsigned numbers including decimals. The numbers 2,3,4 are Integers and Real Numbers. The numbers 2.1, 2.9,3.9 are Real Numbers, but not Integers. Real Numbers can include representations of irrational numbers such as pi. Real numbers must be rational, that is a decimal number that terminates after a finite number of decimals. You will sometimes encounter the term Floating Point Numbers. This is a technical term referring to the way that large Real Numbers are represented in a computer. Python hides this detail from you so Real and Floating Point are used intercangeably in this language.
Binary Numbers: And Octal and Hexadecimal. These are numbers used internally by computers. You will run into these values fairly often. For instance, when you see color values in HTML such as “FFFFFF” or “0000FF”,
Hexadecimal and Octal are used because humans can read them without too much trouble and they are compromise between what computers process and what we can read. Any time you see something in Octal or Hexadecimal, you are looking at something that interfaces with the lower levels of a computer. You will most commonly use Hexadecimal numbers when dealing with Unicode character encodings. Python will interpret any number which begins with a leading zero as binary unless formatting commands have been used.
Numbers such as 7i are referred to as complex. They have a real part, the 7, and an imaginary part, i. Chance are you won’t use complex numbers unless you’re working with scientific data.
A String consists of a sequence of characters. The term String refers to how this data type is represented internally. You store text in Strings. Text can by anything, letters, words, sentences, paragraphs, numbers, just about anything.
Lists are close cousins to Strings, though you may never need to think of them that way. A list is just that, a list of things. Lists may contain any number of numbers or any number of strings. List may even contain any number of other lists. Lists are compared to arrays, but they are not the same thing. In most uses, the function the same so the difference, for our purposes, is moot. Strings are like lists in that, internally, the computer works with strings in an identical manner to lists. This is why the operations on Strings are so different from numbers.
The last main data type in the Python programming language is the dictionary. Dictionaries are map types, known in other languages as hashes, and in computer science as Associative Arrays. The best way to think of what the dictionary does is to consider a Library of Congress Call Number(something this audience is familiar with). The call number is what’s called a Key. It connects to a record which contains information about a book. The combination of keys and records, called values, comprises a dictionary. A single key will connect to a discrete group of values such as the items in this record. Dictionaries will be touched on in the next lesson in some detail in the next course. These are fairly advanced data structures and require a solid understanding a programming fundamentals in order to be used properly.
Statements, an Overview
Programs consist of statements. A statement is a unit of executable code. Think of a statement like a sentence. In a nutshell, statements are how you do things in a program. Writing a program consists of breaking down a problem you want to solve into smaller pieces that you can represent as mathematical propositions and then solve. The statement is where this process gets played out. Statements themselves consist of some number of expressions involving data. Let’s see how this works.
An expression would be something like 2+2=4. This expression, however is not a complete statements. Ask Python to evaluate it and you will get the error “SyntaxError: can’t assign to operator”. What’s going on here? Basically we didn’t provide a complete statement. If we want to see the sum of 2+2 we have to write a complete statement that tells the interpreter what to do and what to do it with. The verb here is ‘print’ and the object is ‘2+2’. Ask Python to evaluate ‘print 2+2’ and it will show ‘4’. We could also throw in subject and do something a bit more detailed: ‘Sum=2+2’. In this case we are assigning the value of 2+2 to the variable, Sum. We can then do all sorts of things with Sum. We can print it. We can add other numbers to it, hand it off to a function and so on. For instance, might want to know the root of Sum. In which case we might write something like ‘print sqrt(sum)’ which will display ‘2’.
A shell is essentially a user interface that provides you access to a system’s features. Normally, this means access to an Operating System. In cases like this, the shell provides you access to the Python programming environment.
Anything preceed by a “#” is not interpreted or executed by the programming shell. Comments are used widely to document programs. One school of programming holds that code should be so clear that comments are uncessary.
Operations on Numbers
Expressions are discrete statements in programming that do something. They typically occupy one line of code, though programmers will sometimes squeeze more in. This is generally bad form and can really make your program a mess. Expressions consist of operations and data or rather data and operations on them. So, what can you do with numbers? Here is a concise list of the basic operations for integers and real numbers of all types:
Arithemetic:
Addition: z= x + y
Subtraction: z = x – y
Multiplication: z = x * y. Here the asterisk serves as the ‘X’ multiplication symbol from grade school.
Division: z = x/y. Division.
Exponents: z = x ** y or xy, x to the y power.
Operations have an order of precedence which follows the algebraic order of precedence. The order can be remembered by the old Algebra mnenomic, Please Excuse My Dear Aunt Sally which is remeinds you that the order of operations is:
Parentheses
Exponents
Multiplication
Division
Addition
Subtraction
Operations on Strings
Strings are strange creatures as I’ve noted before. They have their own operations and the arithmetic operations you saw earlier don’t behave the same way with strings.
Putting Expressions Together to Make Statements
As I noted earlier, all computer languages, and natural languages, possess pragmatics, larger scale structures which reduce ambiguity by providing context. This is a fancy way of saying just as sentences posses rules of syntax to make able to be comprehended, larger documents have similar rules. Computer Programs are no different. Here’s a break down of the structure of programs in Python, in a general sense.
Programs consist of one or more modules.
Modules consist of one or more statements.
Statements consist of one or more expressions.
Expressions create and/or manipulate objects(and variables of all kinds).
Modules and Programs are for the next class in the series, though we will survey these larger structures next lesson. For now, we’ll focus on statements and expressions. Actually, we’ve already started with expressions above. In Python, statements can do three things.
Assign a variable
Change a variable
Take an action
Variable Names and Reserved Words
Now that we’ve seen some variable assignments, let’s talk about best practices. First off, aside from reserved words, variable names can be almost any combination of letters, numbers and punctuation marks. You, however, should never ever, use the following punctuation marks in variable names:
+
–
!
@
^
%
(
)
.
“
?
/
:
;
*
These punctuation marks tends to be operators and characters that have special meanings in most computer languages. The other issue is reserved words. What are “reserved words”? They are words that Python interprets as commands. Pythons reservers the following words.:
True: A special value set aside for boolean values
False: The other special value set aside for boolean vaules
None: The logical equivalent of 0
and: a way of combining logical conditions
as: describes how modules are imported
assert: a way of forcing something to take on a certain value. Used in debugging of large programs
break: breaks out of a loop and goes on with the rest of the program
class: declares a class for object oriented design. For now, just remember not to use this variable name
continue: returns to the top of the loop and keeps on going again
def: declares functions which allow you to modularize your code.
elif: else if, a cotnrol structure we’ll see next lesson
else: as above
except: another control structure
finally: a loop control structure
for: a loop control structure
from: used to import modules
global: a scoping statement
if: a control structure/li>
in: used in for each loops
is: a logical operator
lamda: like def, but weird. It defines a function in a single line. I will not teach this becuase it is icky. If you ever learn Perl you will see this sort of thing a lot and you will hate it, but that’s just my personal opinion.
nonlocal: a scoping command
not: a logical operator
or: another logical operator
pass: does nothing. Used as placeholder
raise: raises an error. This is used to write custom error messages. Your programs may have conditions which would be considered invalid based on our business situation. The interpreter may not consider them errors, but you might not want your user to do something so you ‘raise’ an exception and stop the program.
return: tells a function to return a value
try: this is part of an error testing statement
while: starts a while loop
with: a context manager. This will be covered in the course after the next one in this series
yield: works like return
Variable names should be meaningful. Let’s say I have to track a person’s driver license number. explanatory names like ‘driverLicenseNumber’.
Use case to make your variable names readable. Python is case sensitive, meaning a variable named ‘cat’ is different from named ‘Cat’. If you use more than one word to name variable, start of lower case the change case on the second word. For instance “bigCats = [‘Tiger’,’Lion’,’Cougar’, ‘Desmond’]”. The common practice used by programmers in many settings is that variables start with lowercase and functions(methods and so on) start with upper case. This is called “Camel Case” for its lumpy, the humpy appearance. Now, as it happens, there is something of a religious debate over this. Many Python programmers prefer to keep everything lower case and join words in a name by underscores such as “big_cats”. Use whichever is easiest or looks the nicest to you.
Variable names should be unique. Do not reuse names. This will cause confusion later on.
Python conventions. Python, as with any other programming language, has culture built up around it. That means there are some conventions surrounding variable naming. Two leading underscores, __X, denote system variables which have special meaning to the interpreter. So avoid using this for your own variables. There may be a time and place, but that’s for an advanced prorgramming course. A single underscore _X indicates to other programmers that this a fundamental variable and that they mess with it at their own peril.
Avoid starting variable names with a number. This may or may not return an error. It can also mislead anyone reading your program.
“A foolish consistency is the hobgoblin of little minds”. But not to programming minds. Consistency helps the readability of code a great deal. Once you start a system, stick with it.
Statement Syntax
Putting together valid statements can be a little hard at first. There’s a grammar to them. Thus far, we’ve mainly been workign with expressions such as “x = x+1”. You can think of expression as nouns. We’ve clearly defined x, but how do we look inside? For that we need to give it a verb, the print command. We would then write “print x”. However we can skip the middle statement and print an expression such as “print x + 1”. The interpreter evaluates this per the order of operations I laid out earlier. However, once that expression is evaluated, it then applies the verb, “print”, to that expression.
Print is a function that comes with the Python distribution. There are many more and you can create your own. We’ll cover that a bit in next lesson. Let’s look at little more at the grammar of a statement. Consider:
x = sin(b)
Assume that b has been defined elsewhere. x is the subject, b is the object and sin is the verb. Python will go to the right side of the equal sign first. It will then go to the inside of the function and evaluate what’s there first. It then evaluates the value of the function and finishes by setting x to that value. What about something like this?
x=sin(x+3/y)
Python evaluates from the inside out according to the rules of operation. Very complex statements can be built up this way.
x = sin(log((x + 3)/(e**2)))
Regardless of what this expression evaluates to (I don’t actually know), Python starts with the innermost parentheses, then works through the value of e squared then adds 3 to x and divides the result by e squared. With that worked out, it takes the logarithm of the result and takessthe sine of that before setting x to the final result.What you cannot do is execute more than one statement on a line. No more than one verb on a line. In this context, a verb is an assignment, or a command acting on an expression
markdown cell
code cell
Call up your copy of Think Python or go to the website at http://www.greenteapress.com/thinkpython/html/. Read Chapter 2. This will reiterate much of what I’ve presnted here, but this will help cement the content into you minds. Skip section 2.6 because IPython treats everything as script mode. IPyton provides you with the illusion of interactive, but everything happens asynchronously. This means that any action you type in will not instantaneously resolve as it would if you were running Python interactively on your computer. You will have to use print statements to see the results of your work.
Your assignment consists of the following:
Exercise 1 from Chapter 2 of Think Python. If you type an integer with a leading zero, you might get a confusing error:
<<< zipcode = 02492
SyntaxError: invalid token
Other numbers seem to work, but the results are bizarre:
<<< zipcode = 02132
<<< zipcode
1114
Can you figure out what is going on? Hint: display the values 01, 010, 0100 and 01000.
Exercise 3 from Chapter 2 of Think Python.Assume that we execute the following assignment statements:
width = 17
height = 12.0
delimiter = ‘.’
For each of the following expressions, write the value of the expression and the type (of the value of the expression).
width/2
width/2.0
height/3
1 + 2 5
delimiter 5
Exercise 4 from Capter 2 of Think Python. Practice using the Python interpreter as a calculator:
1. The volume of a sphere with radius r is 4/3 π r3. What is the volume of a sphere with radius 5? Hint: 392.7 is wrong!
2. Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3 for the first copy and 75 cents for each additional copy. What is the total wholesale cost for 60 copies?
3/ If I leave my house at 6:52 am and run 1 mile at an easy pace (8:15 per mile), then 3 miles at tempo (7:12 per mile) and 1 mile at easy pace again, what time do I get home for breakfast?
In your IPython notebook Create a markdown cell and write up your exercise in there. Just copy it from the textbook or from the above write up. Next ceate a code cell and do your work in there. Please, comment your work thoroughly. You cannot provide too many comments. Use print statements to see the outcome of your work.