From ceb46d4d93702475ce22fa2cc3781e7729d1b574 Mon Sep 17 00:00:00 2001 From: Omeshvar-K Date: Sat, 27 Dec 2025 12:47:48 +0530 Subject: [PATCH 1/5] Update Built-in Functions-Binary Conversion.md --- Built-in Functions-Binary Conversion.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Built-in Functions-Binary Conversion.md b/Built-in Functions-Binary Conversion.md index bedea1b87..0a327fc86 100644 --- a/Built-in Functions-Binary Conversion.md +++ b/Built-in Functions-Binary Conversion.md @@ -10,8 +10,14 @@ To write a Python program to convert the number **16** into its **binary represe ## 🧾 Program -Add Code Here +``` +a=16 +print(bin(a)) +``` ## Output +image + ## Result +Thus, the program has been successfully executed. From ca9045dafbe4372c344f53085c125afd7b85e696 Mon Sep 17 00:00:00 2001 From: Omeshvar-K Date: Sat, 27 Dec 2025 12:50:52 +0530 Subject: [PATCH 2/5] Update Functions: Modulo Calculator.md --- Functions: Modulo Calculator.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Functions: Modulo Calculator.md b/Functions: Modulo Calculator.md index d32881f06..8f121be7e 100644 --- a/Functions: Modulo Calculator.md +++ b/Functions: Modulo Calculator.md @@ -12,8 +12,21 @@ To write a Python program that defines a function which accepts two values and r ## 🧾 Program -Add code Here +``` +def result(a, b): + modulo_value = a % b + return modulo_value +a=int(input()) +b=int(input()) +print("modulo is", result(a, b)) +``` + ## Output +image + + ## Result + +The program to return two values modulo is successful. From bee2f4c9da3bd9af867d10b9ae327f4e86b86569 Mon Sep 17 00:00:00 2001 From: Omeshvar-K Date: Sat, 27 Dec 2025 13:03:50 +0530 Subject: [PATCH 3/5] Update Lambda Function: Addition of Two Numbers.md --- Lambda Function: Addition of Two Numbers.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Lambda Function: Addition of Two Numbers.md b/Lambda Function: Addition of Two Numbers.md index 520cf0630..92927c359 100644 --- a/Lambda Function: Addition of Two Numbers.md +++ b/Lambda Function: Addition of Two Numbers.md @@ -9,8 +9,19 @@ To write a Python program that defines a **lambda function** which takes two arg 3. Call the function with the user inputs and print the result. ## 🧾 Program -Add code here +``` +a=int(input()) +b=int(input()) +f=lambda a,b: a+b +print(f(a,b)) + +``` ## Output +image + + ## Result + +Thus, the program has been successfully executed. From 875d128596a308e70a146c0cd1a433a41d5bd8e6 Mon Sep 17 00:00:00 2001 From: Omeshvar-K Date: Sat, 27 Dec 2025 13:24:01 +0530 Subject: [PATCH 4/5] Update Looping(Patterns)-Pascal's Triangle Generator.md --- ...g(Patterns)-Pascal's Triangle Generator.md | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Looping(Patterns)-Pascal's Triangle Generator.md b/Looping(Patterns)-Pascal's Triangle Generator.md index 1a7dec6c3..25fd5c615 100644 --- a/Looping(Patterns)-Pascal's Triangle Generator.md +++ b/Looping(Patterns)-Pascal's Triangle Generator.md @@ -27,9 +27,28 @@ To write a Python program that generates **Pascal's Triangle** using numbers. Th --- ## 🧪 Program -Add Code Here + +``` +def factorial(n): + if n == 0 or n == 1: + return 1 + return n * factorial(n - 1) +def combination(n, k): + return factorial(n) // (factorial(k) * factorial(n - k)) +num_rows = int(input("Enter number of rows: ")) +for i in range(num_rows): + print(' ' * (num_rows - i - 1), end='') + for j in range(i + 1): + print(combination(i, j), end=' ') + print() +``` ## Sample Output +image + + ## Result +Thus, the program has been successfully executed + From 519536709284f07587cfe0b07e8b5302da550ec5 Mon Sep 17 00:00:00 2001 From: Omeshvar-K Date: Sat, 27 Dec 2025 13:25:15 +0530 Subject: [PATCH 5/5] Update Loops-Palindrome Number check.md --- Loops-Palindrome Number check.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Loops-Palindrome Number check.md b/Loops-Palindrome Number check.md index 15dd6d692..4f1d45ca8 100644 --- a/Loops-Palindrome Number check.md +++ b/Loops-Palindrome Number check.md @@ -16,7 +16,31 @@ To write a Python program that checks whether a given number is a **palindrome** - Else, print that it is not a palindrome. ## 🧾 Program -Add code Here +``` +num=int(input()) + +rev=0 + +temp=num + +while temp>0: + + rev=(10*rev)+temp%10 + + temp//=10 + + if rev==num: + + print("The given number {} is a Palindrome".format(num)) + + else: + + print("The given number {} is not a palindrome".format(num)) +``` ## Output +image + ## Result + +Thus, the program has been successfully executed .