#π I don't understand where is the problem.
26 messages Β· Page 1 of 1 (latest)
@dark pewter
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
i am new and used to work in pycharm
u dont call the function in ur solution in codewars
it calls it for u when u test it
oh tysm
if u new to coding i suggest getting thonny or even vsc instead
ok thx
Did you think of using Python's own bit_count method?
https://docs.python.org/3/library/stdtypes.html#int.bit_count
!e
x = 23
print(bin(x))
print(x.bit_count())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 0b10111
002 | 4
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 23
002 | 4
kinda defeats purpose of codewars practice as a beginner to just use stuff that does everything for u
not if you want to learn the language built ins
OP never mentioned whatever war you are talking about.
p famous website for coding practice
it's an epic war of attrition against interviewers
which op confirmed he using
btw I believe the error (End Of Line EOF) always happens when you type input() in codewars
ye because input isnt given throught stdin, its given throught the function call which happens automatically like i already mentioned

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.