In [1]:
## Raj Sunderraman
## rsunderraman
## CSC 1301 Prog 1
##

Types of input¶

  • command line input
  • user input from keyboard
  • input from file

Assignment Statement¶

In [2]:
x = 6
In [3]:
print(x)
6
In [4]:
x = x + 1
In [5]:
print(x)
7

Type of values¶

  • boolean
  • numbers
  • strings
In [7]:
True
Out[7]:
True
In [9]:
False
Out[9]:
False

Boolean operations: and, or, not

Numeric operations: +, -, *, /, //, %

In [10]:
7/3
Out[10]:
2.3333333333333335
In [11]:
7//3  #integer division floor function
Out[11]:
2
In [12]:
7%3
Out[12]:
1

string operations: ????

In [13]:
 
  Input In [13]
    x{6}
     ^
SyntaxError: invalid syntax
In [ ]: