# Hi all, I'm a total beginner to `nim` and I was just trying my hand at writing a
# `nimpy` module to use in python to accelerate a slow-performing (and kinda
# esoteric) operation\: returning the sum of the squares of each of the digits of
# a (positive) integer.This is quite literally the first ever code I've ever
# written, but I'm wondering if anyone can give me any pointers on whether I wrote
# it alright/whether there's a better/proper way to write it.```
# import nimpy
# import std/math
# proc sum_of_squares(n: uint): uint {.exportpy.} =
# var number = n
# var new_number: uint
# var remainder: uint
# while number != 0:
# new_number = floorDiv(number, 10)
# remainder = floorMod(number, 10)
# result += remainder^2
# number = new_number