{'fraction_non_alphanumeric': 0.01455026455026455, 'fraction_numerical': 0.0013227513227513227, 'mean_word_length': 5.308333333333334, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Monetary values: double trouble or dollars and sense?

It is curious but there is widespread misuse of floating-point types to represent monetary amounts in introductory programming classes. This is evident from a survey of popular CS1 textbooks. It is instructive to examine how dollars and cents and other currency values are represented in actual practice and how we can utilize those techniques in computer science education, for both the sake of correctness and to illustrate important general principles. Furthermore, it is particularly interesting to review the history of CS education and determine how this situation came to pass. The interplay between technology, academic cultures and institutional development turns out to be quite significant.