Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Task/2nd question
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
a=input("words")
def countingword(word):
word_dict={}
for char in word:
if char != ' ':
if char in word_dict:
word_dict[char]+=1
else:
word_dict[char]=1
sorted_words=sorted(word_dict.keys(), key=lambda x:(x.islower(),x))

for char in sorted_words:
print(f"{char}->{word_dict[char]}")
word=a
countingword(word)
14 changes: 14 additions & 0 deletions Task/vinoy/10th question
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
matrix = []
for _ in range(3):
rows = [int(x) for x in input("Enter 3 integer separated by ','for a row: ").split(",")]
matrix.append(rows)
print(matrix)
matrix_1=[[matrix[i][j]for j in range(3)]for i in range(3)]
for rows in matrix_1:
print(*rows)
#to make the transpose matrix
transpose_matrix = [[matrix[i][j] for i in range(3)] for j in range(3)]
# the transpose matrix
print("Transpose matrix:")
for rows in transpose_matrix:
print(*rows)
12 changes: 12 additions & 0 deletions Task/vinoy/3rd question
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
number = input("Enter a number: ")
digits = [int(digit) for digit in number]
def plus_one(digits):

for i in reversed(range(len(digits))):
if digits[i] < 9:
digits[i] += 1
return digits
digits[i] = 0
return [1] + digits
incremented_digits = plus_one(digits)
print("incremented number:", incremented_digits)