Skip to content

Commit a5f7882

Browse files
committed
init
1 parent 400b6dd commit a5f7882

File tree

102 files changed

+1818
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1818
-10
lines changed

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python: Current File",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal",
13+
"justMyCode": true
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

CodDevX/coddDevX.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import turtle
2+
x = 5
3+
y = "string"
4+
5+
drew = turtle.Turtle()
6+
7+
print(y.upper())
8+
9+
10+
def func(x):
11+
return x + 1
12+
13+
14+
print(func(x))

__pycache__/textwrap.cpython-310.pyc

0 Bytes
Binary file not shown.

averagefunction.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def avg(*nums):
2+
s = 0
3+
for i in nums:
4+
s=s+1
5+
return s/len(nums)

calendar_module.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Enter your code here. Read input from STDIN. Print output to STDOUT
2+
import calendar
3+
4+
d = list(map(int, input().split()))
5+
day_of_the_week = calendar.weekday(d[2], d[0], d[1])
6+
day_conversion = dict({0: "MONDAY", 1: "TUESDAY", 2: "WEDNESDAY", 3: "THURSDAY",
7+
4: "FRIDAY", 5: "SATURDAY", 6: "SUNDAY"})
8+
print(day_conversion[day_of_the_week])

collections_counter.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Enter your code here. Read input from STDIN. Print output to STDOUT
2+
import collections
3+
4+
num_shoes = int(input())
5+
shoes = collections.Counter(map(int,input().split()))
6+
num_customer = int(input())
7+
8+
income = 0
9+
10+
for i in range(num_customer):
11+
size, price = map(int, input().split())
12+
if shoes[size]:
13+
income += price
14+
shoes[size] -= 1
15+
16+
print(income)

collections_default_dict.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Enter your code here. Read input from STDIN. Print output to STDOUT
2+
from collections import defaultdict
3+
4+
a, b = map(int, input().split())
5+
d = {}
6+
for i in range(a):
7+
w = input()
8+
d.setdefault(w, [])
9+
d[w].append(i+1)
10+
for i in range(b):
11+
w = input()
12+
print(*d[w]) if w in d else print(-1)

constructors.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ class Point:
22
def __init__(self, x, y):
33
self.x = x
44
self.y = y
5+
56
def move(self):
67
print("move")
7-
8+
89
def draw(self):
910
print("draw")
1011

1112

1213
point = Point(10, 20)
13-
print(point.x)
14+
print(point.x)

datastructures/bigONotation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import time
2+
3+
def take_first(my_list):
4+
return my_list[0]
5+
6+
short_list = [13, 25, 42]
7+
tic = time.perf_counter()
8+
first = take_first(short_list)
9+
toc = time.perf_counter()
10+
print(first)
11+
print(toc-tic)

0 commit comments

Comments
 (0)