MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

sum_of_digits_of_a_number.py:77–87  ·  view source on GitHub ↗

Main entry point of the program.

()

Source from the content-addressed store, hash-verified

75
76
77def main() -> None:
78 """Main entry point of the program."""
79 chances = 3
80 number = get_integer_input("Enter a number: ", chances)
81
82 if number is None:
83 print("You've used all your chances.")
84 sys.exit()
85
86 result = sum_of_digits(number)
87 print(f"The sum of the digits of {number} is: {result}")
88
89
90if __name__ == "__main__":

Callers 1

Calls 2

get_integer_inputFunction · 0.85
sum_of_digitsFunction · 0.85

Tested by

no test coverage detected