epicours/Algo/B2/Exercises/Imperative exercise.md

188 B

Exercise 1:

def test (n: int) -> bool:
	return n >= 100 and n < 100

def sum_digits (n: int) -> int:
	a = n//100
	b = (n//10)%10
	c = n%10
	return (a+b+c)

Exercise 2: