Automatische Spurenentelle machen
2
3
4
5
6
7
8
90
'
0
7
5
th
g
Clumsy Cassowary
2
3
4
5
6
7
8
90
'
0
7
5
th
g
for x in range(1,6):
for y in range(1,6-x+1):
print(" ",end=" ")
for z in range(x):
print(x,end=" ")
print(" ")
num = 7
factorial = 1
# check if the number is negative, positive or zero
if num < 0:
print("sorry, factorial does not exist for negative numbers")
elif num == 0:
print("the factorial of 0 is 1")
else:
limit = num-1
for i in range(1, limit):
factorial = factorial*i
print("the factorial of",num,"is",factorial)