From 332be529c910c513b177cca2ce3547091f3627cc Mon Sep 17 00:00:00 2001 From: Nireeksha Date: Mon, 5 Oct 2020 11:23:45 +0530 Subject: [PATCH 1/5] added program --- Python/program-17/Bitodec.py | 14 ++++++++++++++ Python/program-17/readme.md | 1 + 2 files changed, 15 insertions(+) create mode 100644 Python/program-17/Bitodec.py create mode 100644 Python/program-17/readme.md diff --git a/Python/program-17/Bitodec.py b/Python/program-17/Bitodec.py new file mode 100644 index 00000000..c64a9c0b --- /dev/null +++ b/Python/program-17/Bitodec.py @@ -0,0 +1,14 @@ +#Python Program to Convert Decimal to Binary + +def decimalToBinary(num): + """This function converts decimal number + to binary and prints it""" + if num > 1: + decimalToBinary(num // 2) + print(num % 2, end='') + + +# decimal number +number = int(input("Enter any decimal number: ")) + +decimalToBinary(number) \ No newline at end of file diff --git a/Python/program-17/readme.md b/Python/program-17/readme.md new file mode 100644 index 00000000..a217e327 --- /dev/null +++ b/Python/program-17/readme.md @@ -0,0 +1 @@ +Program to convert Binary to Decimal \ No newline at end of file From 21198e4326da4c75c3f859f8df8067ff98fffc65 Mon Sep 17 00:00:00 2001 From: Swasthik Shetty <42874695+swaaz@users.noreply.github.com> Date: Wed, 7 Oct 2020 11:20:50 +0530 Subject: [PATCH 2/5] Rename Python/program-17/Bitodec.py to Python/program-18/program.py --- Python/{program-17/Bitodec.py => program-18/program.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Python/{program-17/Bitodec.py => program-18/program.py} (92%) diff --git a/Python/program-17/Bitodec.py b/Python/program-18/program.py similarity index 92% rename from Python/program-17/Bitodec.py rename to Python/program-18/program.py index c64a9c0b..80444473 100644 --- a/Python/program-17/Bitodec.py +++ b/Python/program-18/program.py @@ -11,4 +11,4 @@ def decimalToBinary(num): # decimal number number = int(input("Enter any decimal number: ")) -decimalToBinary(number) \ No newline at end of file +decimalToBinary(number) From 2dbc66ff36b88da6359da445c26dc944c5525726 Mon Sep 17 00:00:00 2001 From: Swasthik Shetty <42874695+swaaz@users.noreply.github.com> Date: Wed, 7 Oct 2020 11:21:05 +0530 Subject: [PATCH 3/5] Rename Python/program-17/readme.md to Python/program-18/readme.md --- Python/program-17/readme.md | 1 - Python/program-18/readme.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 Python/program-17/readme.md create mode 100644 Python/program-18/readme.md diff --git a/Python/program-17/readme.md b/Python/program-17/readme.md deleted file mode 100644 index a217e327..00000000 --- a/Python/program-17/readme.md +++ /dev/null @@ -1 +0,0 @@ -Program to convert Binary to Decimal \ No newline at end of file diff --git a/Python/program-18/readme.md b/Python/program-18/readme.md new file mode 100644 index 00000000..28cc94e5 --- /dev/null +++ b/Python/program-18/readme.md @@ -0,0 +1 @@ +Program to convert Binary to Decimal From 112564691d6ee37e74a3ed1954828a1a7d093211 Mon Sep 17 00:00:00 2001 From: Swasthik Shetty <42874695+swaaz@users.noreply.github.com> Date: Wed, 7 Oct 2020 11:22:10 +0530 Subject: [PATCH 4/5] Rename Python/program-18/program.py to Python/program-19/program.py --- Python/{program-18 => program-19}/program.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Python/{program-18 => program-19}/program.py (100%) diff --git a/Python/program-18/program.py b/Python/program-19/program.py similarity index 100% rename from Python/program-18/program.py rename to Python/program-19/program.py From 2db2b0ef43c82626952a5f6af0940dd0f1ff73b6 Mon Sep 17 00:00:00 2001 From: Swasthik Shetty <42874695+swaaz@users.noreply.github.com> Date: Wed, 7 Oct 2020 11:22:28 +0530 Subject: [PATCH 5/5] Rename Python/program-18/readme.md to Python/program-19/readme.md --- Python/{program-18 => program-19}/readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Python/{program-18 => program-19}/readme.md (100%) diff --git a/Python/program-18/readme.md b/Python/program-19/readme.md similarity index 100% rename from Python/program-18/readme.md rename to Python/program-19/readme.md