make_pi¶
Return an int list length 3 containing the first 3 digits of pi, [3, 1, 4]
.
make_pi() -> [3, 1, 4]
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.
Starter Code¶
from typing import List
def make_pi() -> List[int]:
pass
result = make_pi()
print(result)
Tests¶
from main import make_pi
def test_make_pi_1():
assert make_pi() == [3, 1, 4]