0% found this document useful (0 votes)
53 views6 pages

Advance Comp Reviewer

The document discusses key concepts in Python programming including variables, data types, operators, and control flow structures like for loops and conditional statements. It also covers Python classes, lists, strings, integers, floats, booleans, and comments. The last section provides an overview of Python including its features, popular uses, and career opportunities for Python developers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views6 pages

Advance Comp Reviewer

The document discusses key concepts in Python programming including variables, data types, operators, and control flow structures like for loops and conditional statements. It also covers Python classes, lists, strings, integers, floats, booleans, and comments. The last section provides an overview of Python including its features, popular uses, and career opportunities for Python developers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Reviewer

CS 121 – Midterm

 Variable is a unique identifier in a Python Programming. Its function is to store


data in it.
 For Loop is an example of iteration that can solve a problem that requires the
user to enter ten numbers.
 Classes can have a multiple item object inside of it.
 Comment in python do not have bearing functionality when you run a code. Its
purpose is just to make a label on each code.
 List is a data structure that is in ordered sequence of an element.
 If you want to have a value and output of numbers with decimal point in Python
Programming, you can use Float data type.
 Decision is a conditional statement that returns true.
 Data type String in Python Programming can have a value and output of
alphanumeric (Letters, numbers, or even special characters).
 Integer in Python Programming can have a value and output of whole numbers.
It does not have decimal point.
 True or False is an answer in Python Programming that is produced by Boolean
data type.
Study Python Operators, its symbols and function to code.
 How to properly assign variable in a Python Programming?
 How to print string on Python programming?

What is Python?

•Python is an interpreted, object-oriented, high-level programming language with


dynamic semantics.

•Its high-level built in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for
use as a scripting or glue language to connect existing components together.

•Python's simple, easy to learn syntax emphasizes readability and therefore


reduces the cost of program maintenance.
Why it is popular?
∙ Easy – preferred by beginners and professionals

∙ Free – it is an open-source language which makes it free for everyone to


use ∙

Applications – it can be used for desktop, web, and mobile application


development

∙ Library and Support – it has a great community who constantly make


libraries ang help those in need
Features of Python
1. Easy Language
Python is an easy language. It is easy to read, write, learn and understand.

• Python has a smooth learning curve. It is easy to learn.

• Python has a simple syntax and Python code is easy to understand.

• Since it’s easy to understand, you can easily read and understand
someone else’s code. • Python is also easy to write because of its
simple syntax.
Because it is an easy language, it is used in schools and universities to introduce
students to programming. Python is for both startups and big companies.
2. Readable

The Python language is designed to make developers life easy. Reading a Python
code is like reading an English sentence. This is one of the key reason that makes
Python best for beginners.

Python uses indentation instead of curly braces, unlike other programming


languages. This makes the code look clean and easier to understand.
Features of Python

3. Dynamically-Typed Language

Python is an interpreted language. It comes with the IDLE (Interactive


Development Environment). This is an interpreter and follows the REPL
structure (Read-Evaluate-Print-Loop). It executes and displays the output of
one line at a time.

So it displays errors while you’re running a line and displays the entire stack trace
for the error.

4. Dynamically-Typed Language

Python is not statically-typed like Java. You don’t need to declare data type while
defining a variable. The interpreter determines this at runtime based on the types
of the parts of the expression. This is easy for programmers but can create runtime
errors.

Python follows duck-typing. It means, “If it looks like a duck, swims like a duck
and quacks like a duck, it must be a duck.”

5. Object-Oriented

Python is object-oriented but supports both functional and object-oriented


programming. Everything in Python is an object.

It has the OOP (Object-oriented programming) concepts like inheritance and


polymorphism.

6. Popular and Large Community Support

Python has one of the largest communities on StackOverflow and Meetup. If you
need help, the community will answer your questions.

They also already have many answered questions about Python.

7. Open-Source

Python is open-source and the community is always contributing to it to improve


it. It is free and its source code is freely available to the public. You can
download Python from the official Python Website.

8. Large Standard Library

The standard library is large and has many packages and modules with common
and important functionality. If you need something that is available in this
standard library, you don’t need to write it from scratch. Because of this, you can
focus on more important things.

You can also install packages from the PyPI (Python Package Index) if you want
even more functionality.

9. Platform-Independent

Python is platform-independent. If you write a program, it will run on different


platforms like Windows, Mac and Linux. You don’t need to write them
separately for each platform.

10. Extensible and Embeddable

Python is extensible. You can use code from other languages like C++
in your Python code.

It is also embeddable. You can embed your Python code in other


languages like C++.

11. GUI Support

You can use Python to create GUI (Graphical User Interfaces). You can use
tkinter, PyQt, wxPython or Pyside for this.

Python features a huge number of GUI frameworks available for it to variety of


other cross-platform solutions. It binds to platform-specific technologies.

12. High-level Language

Python is a high-level language and C++ is mid-level. It is easy to understand and


closer to the user. You don’t need to remember system architecture or manage the
memory.
Python use in Industry

Python programming is a skill that can be used in virtually any industry, as well as
in positions far beyond just software development. From industries like finance,
healthcare, and insurance, to fields like aerospace to entertainment — Python-
based tech is driving innovation and new solutions.

Career Opportunity in Python


• Python Developer
• Product Manager
•Data Analyst
•Educator
• Financial Advisors
•Data Journalist

Data types:

1.1 Numeric (Integers, float).


1.2 Text (Character, string).

REPL:

READ - Read the commands


EVALUATE - Evaluates the commands
PRINT- Print the result
LOOP - Loop it back to read the command again
Python IDLE

•IDLE – Integrated Development and Learning Environment)

- is an integrated development environment (IDE) for Python.


- IDLE can be used to execute a single statement just like Python Shell and to:
create, modify, and execute Python scripts.
- IDLE provides a fully-featured text editor to create Python script that
includes
features like syntax highlighting, autocompletion, and smart indent.
- It also has a debugger with stepping and breakpoints features.

Numeric Data Types

• Integers
They are often called just integers or ints, are positive or negative whole
numbers
with no decimal point.

• Float
Also called floats, they represent real numbers and are written with a
decimal point
dividing the integer and fractional parts. Floats may also be in scientific
notation, with
E or e indicating the power of 10 (2.5e2 = 2.5 x 102 = 250).

• Long
Also called longs, they are integers of unlimited size, written like integers
and followed by an
uppercase or lowercase L.

• Complex (Complex Number)


are of the form a + bJ, where a and b are floats and J (or j) represents the
square root of -1
(which is an imaginary number). The real part of the number is a, and the
imaginary part is b.
Complex numbers are not used much in Python programming.

Text Data Types

• Character
Python does not have a character or char type.
All single characters are strings with length one.

• String
Strings are sequences of character data. The string type in Python is called
str
A collection of one or more characters put in a single quote, double-quote or
triple quote.
Operator

Python Programming Language

Assignment Operator
Arithmetic and modulus Operator

Relational Operator
Logical Operator

ASSIGNMENT OPERATOR

ARITHMETIC OPERATOR

RELATIONAL OPERATOR
LOGICAL OPERATOR

You might also like