Save
viczayn
viczayn
Save
Share
Learn
Content
Leaderboard
Learn
Created by
DelightfulFlamingo8384
Visit profile
Cards (26)
Languages
Solve problems using a
computer
, give the computer
instructions
Remember our diaper-changing exercise?
Talk the talk
,
Speak its language
High-level
languages
Python
, C++,
Java
Low-level languages
Machine language
,
computers
can only execute these
High-level
languages have to be processed into
low-level
before the computer can run them
High-level
languages can run on different kinds of computers and are easier for humans to write and read, so most programs are written in
high-level
Interpreter
Processes the program a little bit at a time and
runs
it
Compiler
Translates
everything
before
running it
Python is a programming language that lets you work more
quickly
and integrate your systems more
effectively
Python
is
magic
!
Program
A
larger
file of code that may contain
one
or more functions
Variable
Names that you can assign values to, allowing you to
reuse
them later on
Comments
Notes ignored by the computer, start with a
hash mark
(#) and end at the end of the
line
Operators
+
,
-
, *, /, **, %
Keyword
Words with meaning/purpose in Python, e.g. "and", "
print
", "
if
"
Function
A chunk of code that performs an
action
, can be
built-in
or "user-defined"
Expression
Statements that produce values, e.g. 3 + 5, "Hello world!"
Error
When your program has a problem, the
command area
will provide an
error
message
JES
Jython Environment for Students, allows you to
program
and
experiment
with python
The
top
part (program area) works like a text editor, the bottom part (command area) is the
brains
of the operation
After writing a program, click
Load Program
to compile it
Header
Comments
Comments at the
top
of a program that provide information about the
file
, author, and description
Indentation is not an option, but a requirement in Python to
specify
the "scope" of different chunks of
code
Writing a program
1.
Plan
what you want the program to do (pseudocode)
2. Divide it into parts to make it easier to debug and update
Defining
Functions
Name the
function
for the purpose,
indent
the instructions inside the function
Argument
A value passed to a
function
or method, assigned to a
named local variable
in the function body