From 30694c00fe05cf1a589ee5993c49ca6c7d67597a Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sun, 21 Dec 2025 10:20:08 +0700 Subject: [PATCH] chore: migrate --- Python/Cac phep chia.py | 4 ++++ Python/Ham.py | 8 ++++++++ Python/Hello World.py | 1 + Python/Lenh re nhanh If-Else.py | 10 ++++++++++ Python/Tinh diem trung binh mon hoc.py | 8 ++++++++ Python/Toan tu.py | 5 +++++ Python/Vong lap long nhau.py | 5 +++++ Python/Vong lap.py | 5 +++++ README.md | 2 +- 9 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Python/Cac phep chia.py create mode 100644 Python/Ham.py create mode 100644 Python/Hello World.py create mode 100644 Python/Lenh re nhanh If-Else.py create mode 100644 Python/Tinh diem trung binh mon hoc.py create mode 100644 Python/Toan tu.py create mode 100644 Python/Vong lap long nhau.py create mode 100644 Python/Vong lap.py diff --git a/Python/Cac phep chia.py b/Python/Cac phep chia.py new file mode 100644 index 0000000..37b60a3 --- /dev/null +++ b/Python/Cac phep chia.py @@ -0,0 +1,4 @@ +a = int(input()) +b = int(input()) +print(a // b) +print(format(a / b, '.3f')) \ No newline at end of file diff --git a/Python/Ham.py b/Python/Ham.py new file mode 100644 index 0000000..03b6442 --- /dev/null +++ b/Python/Ham.py @@ -0,0 +1,8 @@ +def is_leap(year): + leap = False + if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: + leap = True + return leap + +year = int(input()) +print(is_leap(year)) \ No newline at end of file diff --git a/Python/Hello World.py b/Python/Hello World.py new file mode 100644 index 0000000..1dc45ac --- /dev/null +++ b/Python/Hello World.py @@ -0,0 +1 @@ +print("Hello World!") \ No newline at end of file diff --git a/Python/Lenh re nhanh If-Else.py b/Python/Lenh re nhanh If-Else.py new file mode 100644 index 0000000..4f444d0 --- /dev/null +++ b/Python/Lenh re nhanh If-Else.py @@ -0,0 +1,10 @@ +n = int(input()) +if n%2 != 0: + print("Weird") +else: + if n >= 2 and n <= 5: + print("Not Weird") + elif n >= 6 and n <=20: + print("Weird") + elif n > 20: + print("Not Weird") \ No newline at end of file diff --git a/Python/Tinh diem trung binh mon hoc.py b/Python/Tinh diem trung binh mon hoc.py new file mode 100644 index 0000000..694745a --- /dev/null +++ b/Python/Tinh diem trung binh mon hoc.py @@ -0,0 +1,8 @@ +a1,b1,c1,a2,b2,a3 = input().split() +a1 = float(a1) +b1 = float(b1) +c1 = float(c1) +a2 = float(a2) +b2 = float(b2) +a3 = float(a3) +print(((a1 + b1 + c1) + (a2 + b2) * 2 + a3 * 3) / 10) \ No newline at end of file diff --git a/Python/Toan tu.py b/Python/Toan tu.py new file mode 100644 index 0000000..97c08dd --- /dev/null +++ b/Python/Toan tu.py @@ -0,0 +1,5 @@ +a = int(input()) +b = int(input()) +print(a + b) +print(a - b) +print(a * b) \ No newline at end of file diff --git a/Python/Vong lap long nhau.py b/Python/Vong lap long nhau.py new file mode 100644 index 0000000..2f51a69 --- /dev/null +++ b/Python/Vong lap long nhau.py @@ -0,0 +1,5 @@ +n = int(input()) +for i in range(n): + for j in range(n): + print('*', end = ' ') + print() \ No newline at end of file diff --git a/Python/Vong lap.py b/Python/Vong lap.py new file mode 100644 index 0000000..8e44f23 --- /dev/null +++ b/Python/Vong lap.py @@ -0,0 +1,5 @@ +sum = 0 +n = int(input()) +for i in range (1, n + 1): + sum += i +print(sum) \ No newline at end of file diff --git a/README.md b/README.md index 2c297a7..70d7f3b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # CodePower -An old project in 2020/05/29 +An old project archived in 2020/05/29