Myassignmenthelpers.com is an Online service provider for Python assignments & homework problems. Our online experts provide Python Assignment help & Python homework help with aims to help college students across the globe. Our writers provide you unique data along with a plagiarised report so that you can ensure that your data is unique. Our writers are available 24*7. Please send your complete requirements at support@myassignmenthelpers.com or else attach on the website. You can also discuss the requirements with our chat agent.
2. Python Tutorial Assignments
• interactive "shell"
• basic types: numbers, strings
• container types: lists, dictionaries, tuples
• variables
• control structures
• functions & procedures
• classes & instances
• modules & packages
• exceptions
• files & standard library
• what's new in Python 2.0 and beyond
3. Python Assignment Overview
• Programs are composed of modules
• Modules contain statements
• Statements contain expressions
• Expressions create and process objects
4. Python Assignment Interpreter
• >>> 3 + 7
• 10
• >>> 3 < 15
• True
• >>> 'print me'
• 'print me'
• >>> print 'print me'
• print me
• >>>
• Python is an interpreted language
• The interpreter provides an interactive
environment to play with the language
• Results of expressions are printed on the
screen
6. Numbers: Floating Point
>>> 1.23232
1.2323200000000001
>>> print 1.23232
1.23232
>>> 1.3E7
13000000.0
>>> int(2.0)
2
>>> float(2)
2.0
int(x) converts x to an integer
float(x) converts x to a floating point
The interpreter shows
a lot of digits
7. Running Interactively on UNIX
On Unix…
% python
>>> 3+3
6
• Python prompts with ‘>>>’.
• To exit Python (not Idle):
– In Unix, type CONTROL-D
– In Windows, type CONTROL-Z + <Enter>
– Evaluate exit()
8. Editing Python in Emacs
• Emacs python-mode has good support for editing Python, enabled enabled by default for
.py files
• Features: completion, symbol help, eldoc, and inferior interpreter shell, etc.
9. Basic Datatypes
• Integers (default for numbers)
z = 5 / 2 # Answer 2, integer division
• Floats
x = 3.456
• Strings
– Can use “” or ‘’ to specify with “abc” == ‘abc’
– Unmatched can occur within the string: “matt’s”
– Use triple double-quotes for multi-line strings or
strings than contain both ‘ and “ inside of them:
“““a‘b“c”””
10. Python Assignment
• Binding a variable in Python means setting a name to hold
a reference to some object
– Assignment creates references, not copies
• Names in Python do not have an intrinsic type, objects
have types
– Python determines the type of the reference automatically
based on what data is assigned to it
• You create a name the first time it appears on the left side
of an assignment expression:
x = 3
• A reference is deleted via garbage collection after any
names bound to it have passed out of scope
• Python uses reference semantics (more later)
11. Python Features
• no compiling or linking
• rapid development cycle
• no type declarations
• simpler, shorter, more flexible
• automatic memory management
• garbage collection
• high-level data types and operations
• fast development
• object-oriented programming
• code structuring and reuse, C++
• embedding and extending in C
• mixed language systems
• classes, modules, exceptions
• "programming-in-the-large" support
• dynamic loading of C modules
• simplified extensions, smaller binaries
• dynamic reloading of C modules
• programs can be modified without stopping
12. Python structure
• modules: Python source files or C extensions
– import, top-level via from, reload
• statements
– control flow
– create objects
– indentation matters – instead of {}
• objects
– everything is an object
– automatically reclaimed when no longer needed
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Right-click on a slide to add sections. Sections can help to organize your slides or facilitate collaboration between multiple authors.
Notes
Use the Notes section for delivery notes or to provide additional details for the audience. View these notes in Presentation View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.