Skip to content

Commit

Permalink
Merge pull request geekcomputers#654 from gulabraoingle/patch-1
Browse files Browse the repository at this point in the history
Added comments about float and list unpacking
  • Loading branch information
geekcomputers authored Nov 3, 2019
2 parents 29166b5 + 47efb51 commit 3fea288
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Decimal_To_Binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ def dtbconverter(num): # Function inputs a float value and returns a list as ou


# Test lines.
# Converts user input to float which is a string initially
number = float(input("Enter Any base-10 Number: "))
# The * operator unpacks the list returned by dtbconverter(number)
print("The Binary Equivalant: ", *dtbconverter(number))

0 comments on commit 3fea288

Please sign in to comment.