forked from robertgaum/CS110
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab1.py
47 lines (47 loc) · 855 Bytes
/
Lab1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
print("Lab Assignment 1")
print("Robert Gaum")
print("'\"\"\"'\"\"\"\"'''\"\"''\"")
print("Please enter your name: ")
print("Hello, "+ input())
a = 6
print(type(a))
b = 4.25
print(type(b))
c = "Hello!"
print(type(c))
d = True
print(type(d))
e = [1,2,3,4]
print(type(e))
print(e[3])
f = (1,2,3,4)
print(type(f))
print(f[1])
g = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
print(type(g))
print(g['Age'])
h,i = 2, 6
print(h*i)
h,i = 5, 6
print(h+i)
h,i = 2, 8
print(h-i)
h,i = -3, 9
print(h-i)
h,i = 4, 2
print(h/i)
h,i = 2, 4
print(h/i)
h,i = 5, 2
print(h%i)
h,i = 5, 3
print(h%i)
h,i = 6, 2
print(h%i)
h,i = 2, 5
print(h**i)
j = 25
k = 25
print(id(j))
print(id(k))
print("Python is memory efficient in the way that two variables with the exact same value and value type, point to the same spot in memory.")