Python Forum
Assist with calculation - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Assist with calculation (/thread-13976.html)



Assist with calculation - bbm8 - Nov-09-2018

I am writing a short program to count the number of times a digit appears in a large number but I can’t think of what math I would use to do this. I have no code to post as I can’t start until I figure out the math.


RE: Assist with calculation - Larz60+ - Nov-09-2018

convert number to string
get length of string


RE: Assist with calculation - bbm8 - Nov-09-2018

(Nov-09-2018, 10:57 AM)Larz60+ Wrote: convert number to string
get length of string

Thank you