WebMar 4, 2024 · I was given the challenge of converting a string of digits into 'fake binary' on Codewars.com, and I am to convert each individual digit into a 0 or a 1, if the number is … WebFake Binary 25,567 of 94,732 PG1 Details Solutions Discourse (205) Description: Given a string of digits, you should replace any digit below 5 with '0' and any digit 5 and above with '1'. Return the resulting string. Note: input will never be an empty string Fundamentals Strings Arrays Similar Kata: 5 kyu The Binary Binary Expansion 103 Voile 7 kyu
Codewars/reversed-sequence.py at master · Manish-Giri/Codewars
Webdef fake_bin (s) Insert you code here... char = s.split print char replace = "" char.each do i print i n= i.to_i if (n <= 5) n = 0 else n = 1 end replace += n.to_s end return replace end Can someone tell me what is going wrong in my code EduDomingos (7 kyu) last month Issue WebCodewars-Solutions-Python/Fake Binary Go to file Go to fileT Go to lineL Copy path Copy permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Cannot retrieve contributors at this time 23 lines (18 sloc) 454 Bytes Raw Blame Edit this file E Open in GitHub Desktop piol hit festival
CODEWARS! - Fake Binary (Java) #1 - YouTube
WebFake Binary 25,567 of 94,732 PG1 Details Solutions Discourse (205) Description: Given a string of digits, you should replace any digit below 5 with '0' and any digit 5 and above … WebJoin our Discord server and chat with your fellow code warriors WebMar 4, 2024 · I was given the challenge of converting a string of digits into 'fake binary' on Codewars.com, and I am to convert each individual digit into a 0 or a 1, if the number is less than 5 it should become a 0, and if it's 5 or over it should become a 1. I know how to analyze the whole string's value like so: steph curry jersey youth small