-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice_2.py
More file actions
76 lines (61 loc) · 1.61 KB
/
Copy pathpractice_2.py
File metadata and controls
76 lines (61 loc) · 1.61 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#sample = ["Nice", "Me love it too", "Zoom", "Awesome", "Ah... Always love a classic"]
# b = len(sample)
# cars = []
# x = True
# import random
# while x == True:
# y = input("What car do you like? \n : ")
# if y != "q":
# a = random.randrange(1,b)
# cars.append(y)
# print(sample[a])
# else:
# break
# print("So far, car inputs were : ", cars)
# cars.insert(1, "nice")
# # cars.remove("Toyota")
# del cars[1]
# print(cars)
# print(sorted(sample, reverse = True))
# print(sample)
# print(f"{len(sample)} is the lenght of sample sentences")
# print(sample[6])
# pizza = ["Pepperoni", "Cheese", "Tikka", "Afghani"]
# for a in pizza:
# print(f"I love {a}")
# print()
# x = []
# for a in range(11):
# print(a ** 3)
# x.append(a)
# print(x[:3])
# print(x[4:7])
# print(x[-3:])
# foodlist = ('pizza', 'falafel', 'carrot cake', 'cannoli', 'ice cream')
# foodlist = ("changedfood1", "changedfood2", "changedfood3")
# for a in foodlist:
# # print(a)
# car = 'subaru'
# print("Is car == 'subaru'? I predict True.")
# print(car == 'subaru')
# print("\nIs car == 'audi'? I predict False.")
# print(car == 'audi')
# if "Nice" in sample:
# print(True)
# print(list(x**2 for x in range(0,11)))
# import random
# x = ["green", "red", "yello"]
# y = random.randint(1,3)
# if y == 1:
# z = x[0]
# elif y == 2:
# z = x[1]
# elif y == 3:
# z = x[2]
# print(z)
# user_names = ["Eric", "Admin", "Ali"]
# x = input("Enter your username")
# if x == "Admin":
# print(f"Welcome {x}, would you like to see the login report?")
# elif x in user_names:
# print(f"Welcome back {x}")