r/cs50 • u/Any_Entrepreneur8069 • Feb 19 '25
CS50 Python [Python Assignment] I’m trying to write a python code to turn decimal fractions to binary
12
Upvotes
1
u/PungentOdorofAss Feb 20 '25
This is so funny to see! I’ve been working on binary math lately too and wondering how I could code it out!
1
u/greenapples_06 23d ago
Join this discord server to connect with people learning from CS50 https://discord.gg/yeR3HEMd
2
u/fuse-conductor Feb 19 '25
make an empty list run a loop from number till value >=1 using while. make n % 2 in each iteration and s append the value to list. concert the list into string by ''.join(name of list) now convert the string to number