- 1 Ishybrindt We Ll Say That An Integer Is A Hybrindt Number Coined Term If It Is A Positive Integer And The Most Fr 1 (80.75 KiB) Viewed 14 times
1. isHybrindt() We'll say that an integer is a hybrindt number (coined term) if it is a positive integer and the most fr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. isHybrindt() We'll say that an integer is a hybrindt number (coined term) if it is a positive integer and the most fr
1. isHybrindt() We'll say that an integer is a hybrindt number (coined term) if it is a positive integer and the most frequently occurring digit in the number is a 9. Some examples of hybrindt numbers are: 9, 99, 199, 1999773, 912121999. Some numbers that are not hybrindt are: 7 (no nines at all), 292 (more 2s than 9s), 19 (same number of 1s as 9s), 92121212999 (same number of 2s as 9s). Write the function isHybrindt(n), which takes a positive integer n and returns True if n is a hybrindt number and False otherwise. You can write any additional helper functions that you need. Hint: We found it very useful to write a helper function capable of counting the frequency of a digit in a number.