Skip to main content
added 26 characters in body
Source Link
Julian
  • 3.2k
  • 7
  • 17

PowerShell Core, 5059 bytes

param($a)-join(0..9|%{("⚪","🔵")[$_[$a-lt0-or$_-lt$a*10]})

Try it online!Try it online!

Fixed the behaviour for negative values, thanks Adám!

PowerShell Core, 50 bytes

param($a)-join(0..9|%{("⚪","🔵")[$_-lt$a*10]})

Try it online!

PowerShell Core, 59 bytes

param($a)-join(0..9|%{("⚪","🔵")[$a-lt0-or$_-lt$a*10]})

Try it online!

Fixed the behaviour for negative values, thanks Adám!

deleted 21 characters in body
Source Link
Julian
  • 3.2k
  • 7
  • 17

PowerShell Core, 6150 bytes

"🔵"*($t=[int][Math]::Ceilingparam($args[0]*10)$a)+-join("⚪"*0..9|%{(10-$t"⚪","🔵")[$_-lt$a*10]})

Try it online!Try it online!

PowerShell Core, 61 bytes

"🔵"*($t=[int][Math]::Ceiling($args[0]*10))+("⚪"*(10-$t))

Try it online!

PowerShell Core, 50 bytes

param($a)-join(0..9|%{("⚪","🔵")[$_-lt$a*10]})

Try it online!

Source Link
Julian
  • 3.2k
  • 7
  • 17

PowerShell Core, 61 bytes

"🔵"*($t=[int][Math]::Ceiling($args[0]*10))+("⚪"*(10-$t))

Try it online!