0% found this document useful (0 votes)
73 views4 pages

CEN111: Programming I: International Burch University

This lecture introduces basic data types in Python including integers, floating point numbers, and strings. It discusses integers and floats in more detail, covering their properties and limitations. Arithmetic operators from lowest to highest precedence are also covered. The lecture then discusses strings, how they are defined using quotation marks, and string operators. Finally, it defines variables as names that refer to values, how the assignment operator = is used, and the naming conventions for variables in Python.

Uploaded by

lu cucu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views4 pages

CEN111: Programming I: International Burch University

This lecture introduces basic data types in Python including integers, floating point numbers, and strings. It discusses integers and floats in more detail, covering their properties and limitations. Arithmetic operators from lowest to highest precedence are also covered. The lecture then discusses strings, how they are defined using quotation marks, and string operators. Finally, it defines variables as names that refer to values, how the assignment operator = is used, and the naming conventions for variables in Python.

Uploaded by

lu cucu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CEN111: Programming I

IBU Lecture 2
International Burch University
Lecture #2
Basic Data Types
Integers
Floating Point Numbers
Strings
Integer: int
A whole number
Be careful not to use commas in your numbers, for example: 1,000
Floating point number: float
A number that contains a decimal point
Has minimum and maximum values
Limited precision
4 is not the same as 4.0
Arithmetic Operators
(Lowest precedence to highest precedence )
+ -
* /
//
%
** 2/1
String: str
A sequence of one or more characters
A string of letters and numbers
Enclosed in quotation marks
Double quoted strings can contain single quotes and vice versa
Triple quotes can span multiple lines
String operators:
+
*

3/1
Variable
A name that refers to a value
An ”assignment statement” gives a value to a variable
Variables remember things
Variables can change, too
= is Python’s assignment token
Variable names
Can be of any length
Characters must be letters, numbers, or the underscore ( )
First character cannot be a number
Case sensitive
Python keywords cannot be used as variable names

4/1

You might also like