Skip to content

Commit 3b8f00c

Browse files
committed
init
1 parent 23db83d commit 3b8f00c

Some content is hidden

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

43 files changed

+334
-0
lines changed
379 Bytes
Binary file not shown.

__pycache__/utils.cpython-310.pyc

310 Bytes
Binary file not shown.

arraypython.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import math
2+
import os
3+
import random
4+
import re
5+
import sys
6+
7+
8+
if __name__ == '__main__':
9+
n = int(input().strip())
10+
11+
arr = list(map(int, input().rstrip().split()))
12+
13+
print(*reversed(arr))

calculator.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
num1 = float(input("Enter first number: "))
2+
op = input("Enter operator: ")
3+
num2 = float(input("Enter second number: "))
4+
5+
if op == "+":
6+
print(num1 + num2)
7+
elif op == "-":
8+
print(num1 - num2)
9+
elif op == "*":
10+
print(num1 * num2)
11+
elif op == "/":
12+
print(num1 / num2)
13+
else:
14+
print("Invalid operator")

classes.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Point:
2+
def move(self):
3+
print("move")
4+
5+
def draw(self):
6+
print("draw")
7+
8+
9+
point1 = Point()
10+
point1.x = 10
11+
point1.y = 10
12+
print(point1.x * point1.y)
13+
point1.draw()

constructors.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Point:
2+
def __init__(self, x, y):
3+
self.x = x
4+
self.y = y
5+
def move(self):
6+
print("move")
7+
8+
def draw(self):
9+
print("draw")
10+
11+
12+
point = Point(10, 20)
13+
print(point.x)

converters1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def lbs_to_kg(weight):
2+
return weight * 0.45
3+
4+
5+
def kg_to_lbs(weight):
6+
return weight / 0.45

dictionaries.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
customer = {
2+
"name": "A",
3+
"age": 27,
4+
"is_verified": True
5+
}
6+
customer["name"]

ecommerce/__init__.py

Whitespace-only changes.
161 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)