Not really sure how to title this question but basically I'm wondering if there is a way to make this:
Feet Meters | Meters Feet
---- ------ | ------ ----
1 0.305 | 1 3.281
2 0.61 | 2 6.562
3 0.914 | 3 9.843
4 1.219 | 4 13.123
5 1.524 | 5 16.404
6 1.829 | 6 19.685
7 2.134 | 7 22.966
8 2.438 | 8 26.247
9 2.743 | 9 29.528
10 3.048 | 10 32.808
Do this:
Feet Meters | Meters Feet
---- ------ | ------ ----
1 0.305 | 1 3.281
2 0.61 | 2 6.562
3 0.914 | 3 9.843
4 1.219 | 4 13.123
5 1.524 | 5 16.404
6 1.829 | 6 19.685
7 2.134 | 7 22.966
8 2.438 | 8 26.247
9 2.743 | 9 29.528
10 3.048 | 10 32.808
My code:
print("Feet Meters | Meters Feet\n"+
"---- ------ | ------ ----")
counter = 1
for i in range(10):
print(counter, " ", round(conversions.feet_to_meters(counter), 3), " | ", counter, " ", round(conversions.meters_to_feet(counter), 3))
counter += 1
So I just want to change the formatting of the answer so everything lines up,
maybe I just have a brain fart but I can't think of a way right now.