So I have assignment that I completed but there's one last step where the print just says none. Here's my code
#Copy the definition of function print_chars below
def print_chars(multiples, char):
print_chars= multiples* char
print (print_chars)
#Copy the definition of function sum_arithmetic_seq below
def sum_arithmetic_seq(n):
return n* (n+1)//2
#Copy the definition of function factorial below
import math
def factorial(n):
return math.factorial(n)
#Here's my program
for N in range(1,7,1):
print(N)
print('sum:', print_chars(sum_arithmetic_seq(N) ,'*'))
print('factorial:', print_chars(factorial(N),'#'))
The output would end up like this (I'm just going to put part of it because it's long.)
1
*
sum: None
#
factorial: None
How it's supposed to be:
1
sum: *
factorial: #