summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSudipto Mallick <smlckz@termux-alpine>2024-01-13 09:28:10 +0530
committerSudipto Mallick <smlckz@termux-alpine>2024-01-13 09:28:10 +0530
commit8fb719f58f91d1f1f187a1db974682fb3736ee05 (patch)
tree506e070c7900cc5e3fb31000dbd1a39e95809c61
parent53d75846cc95a3af5d90c01b5ef010818b4adcf7 (diff)
downloadzadania-8fb719f58f91d1f1f187a1db974682fb3736ee05.tar.gz
Changes to project structure of Python assignments
As was directed to remove assignments.
-rw-r--r--python/code/01_math_functions.py (renamed from python/code/1/2.txt)0
-rw-r--r--python/code/02_num_ops.py (renamed from python/code/1/4.py)0
-rw-r--r--python/code/03_flt_ops.py (renamed from python/code/1/6.py)0
-rw-r--r--python/code/04_gsum.py (renamed from python/code/2/1.py)0
-rw-r--r--python/code/05_lam_key.py (renamed from python/code/2/3.py)0
-rw-r--r--python/code/06_cal.py (renamed from python/code/2/5.py)0
-rw-r--r--python/code/07_hstarpat.py (renamed from python/code/2/7.py)0
-rw-r--r--python/code/09_str_count.py (renamed from python/code/3/4.py)0
-rw-r--r--python/code/1/1.txt17
-rw-r--r--python/code/1/3.txt17
-rw-r--r--python/code/1/7.py5
-rw-r--r--python/code/10_caeser_cipher.py (renamed from python/code/3/6.py)0
-rw-r--r--python/code/2/2.py12
-rw-r--r--python/code/2/4.py27
-rw-r--r--python/code/2/6.py11
-rw-r--r--python/code/3/3.py11
-rw-r--r--python/code/3/5.py5
-rw-r--r--python/code/3/7.py9
-rw-r--r--python/output/03_flt_ops.typ (renamed from python/output/1/6.txt)0
-rw-r--r--python/output/04_gsum.typ (renamed from python/output/2/1.txt)0
-rw-r--r--python/output/06_cal.typ (renamed from python/output/2/5.txt)0
-rw-r--r--python/output/07_hstarpat.typ (renamed from python/output/2/7.txt)0
-rw-r--r--python/output/10_caeser_cipher.typ (renamed from python/output/3/6.txt)0
-rw-r--r--python/output/2/2.txt4
-rw-r--r--python/output/2/4.txt24
-rw-r--r--python/output/2/6.txt7
-rw-r--r--python/output/3/3.txt9
-rw-r--r--python/output/3/5.txt4
-rw-r--r--python/output/3/7.txt9
29 files changed, 0 insertions, 171 deletions
diff --git a/python/code/1/2.txt b/python/code/01_math_functions.py
index 08c95b5..08c95b5 100644
--- a/python/code/1/2.txt
+++ b/python/code/01_math_functions.py
diff --git a/python/code/1/4.py b/python/code/02_num_ops.py
index 7579373..7579373 100644
--- a/python/code/1/4.py
+++ b/python/code/02_num_ops.py
diff --git a/python/code/1/6.py b/python/code/03_flt_ops.py
index e3a3cd0..e3a3cd0 100644
--- a/python/code/1/6.py
+++ b/python/code/03_flt_ops.py
diff --git a/python/code/2/1.py b/python/code/04_gsum.py
index 7ccd78f..7ccd78f 100644
--- a/python/code/2/1.py
+++ b/python/code/04_gsum.py
diff --git a/python/code/2/3.py b/python/code/05_lam_key.py
index 2a8dd10..2a8dd10 100644
--- a/python/code/2/3.py
+++ b/python/code/05_lam_key.py
diff --git a/python/code/2/5.py b/python/code/06_cal.py
index ba78eec..ba78eec 100644
--- a/python/code/2/5.py
+++ b/python/code/06_cal.py
diff --git a/python/code/2/7.py b/python/code/07_hstarpat.py
index 3212851..3212851 100644
--- a/python/code/2/7.py
+++ b/python/code/07_hstarpat.py
diff --git a/python/code/3/4.py b/python/code/09_str_count.py
index 3c0a566..3c0a566 100644
--- a/python/code/3/4.py
+++ b/python/code/09_str_count.py
diff --git a/python/code/1/1.txt b/python/code/1/1.txt
deleted file mode 100644
index 827a09a..0000000
--- a/python/code/1/1.txt
+++ /dev/null
@@ -1,17 +0,0 @@
->>> 2 + 3
-5
->>> 1 + 2 * 3 - 4
-3
->>> 12 * 5 / 3 * 2
-40.0
->>> 5 / 8
-0.625
->>> 23 // 7
-3
->>> 17 % 5 - 1
-1
->>> 3 * (4 + 5) + 5
-32
->>> (2 + (7 + 2) / 3 - 4) / (-2 / 7 + (19 - 3 * 4) / 8)
-1.696969696969697
-
diff --git a/python/code/1/3.txt b/python/code/1/3.txt
deleted file mode 100644
index 90ebdbe..0000000
--- a/python/code/1/3.txt
+++ /dev/null
@@ -1,17 +0,0 @@
->>> a, b = 3 + 2j, 4 - 3j
->>> a + b, a - b, a * b, a / b
-((7-1j), (-1+5j), (18-1j), (0.24+0.68j))
->>> -a, -b
-((-3-2j), (-4+3j))
->>> (a + b) / (a - b)
-(-0.4615384615384615-1.3076923076923077j)
->>> abs(a), abs(b)
-(3.605551275463989, 5.0)
->>> a.imag, a.real
-(2.0, 3.0)
->>> a.conjugate(), b.conjugate()
-((3-2j), (4+3j))
->>> from cmath import phase
->>> phase(a), phase(b)
-(0.5880026035475675, -0.6435011087932844)
-
diff --git a/python/code/1/7.py b/python/code/1/7.py
deleted file mode 100644
index 37ecfa3..0000000
--- a/python/code/1/7.py
+++ /dev/null
@@ -1,5 +0,0 @@
-a = int(input('Enter first number: '))
-b = int(input('Enter second number: '))
-q, r = a // b, a % b
-q1d, r1d = q % 10, r % 10
-print(f'The one’s place digits of quotient and remainder are {"" if q1d == r1d else "not"} equal.')
diff --git a/python/code/3/6.py b/python/code/10_caeser_cipher.py
index 64b1a60..64b1a60 100644
--- a/python/code/3/6.py
+++ b/python/code/10_caeser_cipher.py
diff --git a/python/code/2/2.py b/python/code/2/2.py
deleted file mode 100644
index bb3e9d2..0000000
--- a/python/code/2/2.py
+++ /dev/null
@@ -1,12 +0,0 @@
-def is_prime(n):
-    if n < 2: return False
-    for i in range(2, n):
-        if n % i == 0: return False
-    return True
-
-def filter_prime(numbers):
-    return [number for number in numbers if is_prime(number)]
-
-numbers = [int(n) for n in input('Enter a list of numbers: ').split()]
-primes = [number for number in numbers if is_prime(number)]
-print('List of primes:', primes)
diff --git a/python/code/2/4.py b/python/code/2/4.py
deleted file mode 100644
index 21b1bf4..0000000
--- a/python/code/2/4.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from random import randrange
-
-def game():
-    secret = randrange(1, 11)
-    for i in range(3):
-        guess = int(input('Enter a guess: '))
-        if guess != secret:
-            print('Wrong guess!', end=' ')
-        else:
-            print(f'Correct guess in {i + 1} {"try" if i == 0 else "tries"}!')
-            return
-        if i != 2:
-            print('Try again.')
-        else:
-            print('Game over!')
-            print(f'Secret value was {secret}')
-
-while True:
-    print('Welcome to number guessing game')
-    print('Try to guess the secret random number between 1 to 10 correctly in 3 tries')
-    game()
-    choice = input('Do you want to try playing again (y/n, default n): ')
-    if choice == '' or choice == 'n':
-        print('Thanks for playing. Bye!')
-        break
-    else:
-        print('Enjoy your next play\n')
diff --git a/python/code/2/6.py b/python/code/2/6.py
deleted file mode 100644
index 8013ae4..0000000
--- a/python/code/2/6.py
+++ /dev/null
@@ -1,11 +0,0 @@
-line = input('Enter a string: ')
-uppercase_count, lowercase_count, digit_count = 0, 0, 0
-for c in line:
-    if c.isupper(): uppercase_count += 1
-    elif c.islower(): lowercase_count += 1
-    elif c.isdigit(): digit_count += 1
-
-print('Number of')
-print('  Uppercase characters:', uppercase_count)
-print('  Lowercase characters:', lowercase_count)
-print('  Digits:', digit_count)
diff --git a/python/code/3/3.py b/python/code/3/3.py
deleted file mode 100644
index 7f9a98f..0000000
--- a/python/code/3/3.py
+++ /dev/null
@@ -1,11 +0,0 @@
-full_name = input("Enter your full name: ")
-space_index = full_name.rfind(' ')
-
-if space_index == -1:
-  print(f"Your name in reverse: {full_name}")
-else:
-  first_name = full_name[:full_name.index(' ')]
-  last_name = full_name[space_index + 1:]
-  print(f"Your name in reverse: {last_name}, {first_name}")
-
-
diff --git a/python/code/3/5.py b/python/code/3/5.py
deleted file mode 100644
index 7db13a0..0000000
--- a/python/code/3/5.py
+++ /dev/null
@@ -1,5 +0,0 @@
-text = input('Enter a line of text: ')
-vowels = set('aeiouAEIOU')
-ctext = ''.join(c for c in text if c not in vowels)
-print('Given text with all vowels removed:', ctext)
-
diff --git a/python/code/3/7.py b/python/code/3/7.py
deleted file mode 100644
index 7a17f08..0000000
--- a/python/code/3/7.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import sys
-address = input('Enter an E-mail address: ')
-if '@' not in address:
-    print(address, 'is not a valid E-mail address')
-    sys.exit(1)
-at_position = address.rindex('@')
-username, domain = address[:at_position], address[at_position+1:]
-print('Username:', username)
-print('Domain:', domain)
diff --git a/python/output/1/6.txt b/python/output/03_flt_ops.typ
index b238b5f..b238b5f 100644
--- a/python/output/1/6.txt
+++ b/python/output/03_flt_ops.typ
diff --git a/python/output/2/1.txt b/python/output/04_gsum.typ
index 81480d1..81480d1 100644
--- a/python/output/2/1.txt
+++ b/python/output/04_gsum.typ
diff --git a/python/output/2/5.txt b/python/output/06_cal.typ
index 35b538d..35b538d 100644
--- a/python/output/2/5.txt
+++ b/python/output/06_cal.typ
diff --git a/python/output/2/7.txt b/python/output/07_hstarpat.typ
index abb9c92..abb9c92 100644
--- a/python/output/2/7.txt
+++ b/python/output/07_hstarpat.typ
diff --git a/python/output/3/6.txt b/python/output/10_caeser_cipher.typ
index ba5b336..ba5b336 100644
--- a/python/output/3/6.txt
+++ b/python/output/10_caeser_cipher.typ
diff --git a/python/output/2/2.txt b/python/output/2/2.txt
deleted file mode 100644
index 4c06a26..0000000
--- a/python/output/2/2.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-```
-Enter a list of numbers: 1 42 73 23 13 15 17 9 65 48 37 11 4
-List of primes: [73, 23, 13, 17, 37, 11]
-```
diff --git a/python/output/2/4.txt b/python/output/2/4.txt
deleted file mode 100644
index 8188169..0000000
--- a/python/output/2/4.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-```
-Welcome to number guessing game
-Try to guess the secret random number between 1 to 10 correctly in 3 tries
-Enter a guess: 10
-Wrong guess! Try again.
-Enter a guess: 8
-Wrong guess! Try again.
-Enter a guess: 3
-Wrong guess! Game over!
-Secret value was 5
-Do you want to try playing again (y/n, default n): y
-Enjoy your next play
-
-Welcome to number guessing game
-Try to guess the secret random number between 1 to 10 correctly in 3 tries
-Enter a guess: 8
-Wrong guess! Try again.
-Enter a guess: 3
-Wrong guess! Try again.
-Enter a guess: 4
-Correct guess in 3 tries!
-Do you want to try playing again (y/n, default n): 
-Thanks for playing. Bye!
-```
diff --git a/python/output/2/6.txt b/python/output/2/6.txt
deleted file mode 100644
index 32f6729..0000000
--- a/python/output/2/6.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-```
-Enter a string: Hello World ABCDE 123456
-Number of
-  Uppercase characters: 7
-  Lowercase characters: 8
-  Digits: 6
-```
\ No newline at end of file
diff --git a/python/output/3/3.txt b/python/output/3/3.txt
deleted file mode 100644
index e2163f7..0000000
--- a/python/output/3/3.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-```
-Enter your full name: Sudipto Mallick
-Your name in reverse: Mallick, Sudipto
-```
-```
-Enter your full name: Ayush Kumar Shukla
-Your name in reverse: Shukla, Ayush
-```
-
diff --git a/python/output/3/5.txt b/python/output/3/5.txt
deleted file mode 100644
index 11fdc1d..0000000
--- a/python/output/3/5.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-```
-Enter a line of text: The trend towards remote work has accelerated in recent years, with many companies adopting a hybrid or fully remote model. It offers employees more flexibility and can lead to increased productivity and job satisfaction.
-Given text with all vowels removed: Th trnd twrds rmt wrk hs cclrtd n rcnt yrs, wth mny cmpns dptng  hybrd r flly rmt mdl. t ffrs mplys mr flxblty nd cn ld t ncrsd prdctvty nd jb stsfctn.
-```
diff --git a/python/output/3/7.txt b/python/output/3/7.txt
deleted file mode 100644
index 23b872f..0000000
--- a/python/output/3/7.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-```
-Enter an E-mail address: user@example.net
-Username: user
-Domain: example.net
-```
-```
-Enter an E-mail address: abcdefghi
-abcdefghi is not a valid E-mail address
-```