-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson1.py
41 lines (35 loc) · 1.01 KB
/
lesson1.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
print('Hello')
print('lessson1')
print('lesson')
x = "tree" #x is a variable and it can hold any value
# "=" this sign is called assignment sign in pythhon
print("what is the value of x? Ans.=>" + x)
y = "Tina"
print("what is the name of y?", y)
print(x + y) #concatenation
a="Boy"
b = "girl"
print(a + b)
'''
Numbers = 1, 2 -1, 0, 1.4, -6.7
integer - int (example: -1, 0, 3),
float = 1.0, 1.8, -1.9, 0.0
String: "child", 'x'
List: list = ["karishma", "jimmy", "orange"]
Tuple
Dictionary
'''
myVar = 1
print("Tell me the type", type(myVar))
myVar = 1.0
print("Tell me the type", type(myVar))
myVar = "joseph"
print("Tell me the type", type(myVar))
myVar = [ "Karishma", "is", "teaching", 1, 5, 0, 1.7]
print("what is the first item in my list", myVar[0])
print("what is the third item in my list", myVar[2])
print("length of my list", len(myVar))
print("what is last item in my list?", myVar[len(myVar)-1], myVar[-1])
print("last second item in the list", myVar[-2])
print("Tell me the type", type(myVar))
print("hellojoe")