-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPythonBasics.txt
56 lines (42 loc) · 1.09 KB
/
PythonBasics.txt
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
48
49
50
51
52
53
54
55
56
if a>10:
print("greater")
elif a<10:
print("smaller")
elif a==10:
print("equal")
else:
print("normal")
Avinash Mamidi: a= ["JJtech","Session",5,"python",1,2,3]
for temp in a:
if temp == "python" or temp == "Session" or temp == 5:
continue
elif temp == 1:
break
print(temp)
Avinash Mamidi: a= ["JJtech","Session",5,"python",1,2,"Jjtech",3,"bsdhjbv","jsebdvkjbs",44]
for temp in a:
if temp == "python" or temp == "Session" or temp == 5:
continue
elif temp == 3:
break
print(temp)
Avinash Mamidi: basket= ["apple","orange","carrot","pineapple","guava","strawberry","apple","carrot","beetroot","lemon","mango"]
for hand in basket:
if hand == "carrot" or hand == "beetroot":
continue
if hand == "lemon":
break
print(hand)
Avinash Mamidi: def addition(var1,var2):
var3 = var1 * var2
print(var3)
addition(5,3)
addition(7,9)
addition(45,32)
Avinash Mamidi: import random
basket = ["apple","orange","banana"]
print(random.choice(basket))
import datetime
time = datetime.datetime.now()
print(time)
02:44:08