29 lines
352 B
Python
29 lines
352 B
Python
import os
|
|
import math
|
|
import numpy as np
|
|
|
|
|
|
def fac(n):
|
|
if n == 0:
|
|
return 1
|
|
|
|
return n * fac(n-1)
|
|
|
|
def sumDigits(n):
|
|
s = str(n)
|
|
res = 0
|
|
|
|
for c in s:
|
|
res = res + int(c)
|
|
|
|
return res
|
|
|
|
def main():
|
|
print("Hello, this is Patrick")
|
|
|
|
f100 = fac(100)
|
|
s100 = sumDigits(f100)
|
|
print(s100)
|
|
|
|
if __name__ == "__main__":
|
|
main() |