Flip a graph
Wiktor
look at signature.invalid
Sat Jan 4 16:38:19 EST 2014
On Sat, 4 Jan 2014 09:15:39 -0700, Jason Friedman wrote:
> My concern is whether the average 11-year-old will be able to follow such
> logic. Is there a better approach?
Basically mine approach is the same, but maybe is easier to explain it to
kids.
max_height = max(measurement_dict.values())
temporary_graph = []
for t, y in measurement_dict.items():
temporary_graph.append('X'*y + ' '*(max_height - y))
for i in range(max_height-1, -1, -1):
for item in temporary_graph:
print(item[i], end='')
print()
--
Best regards, Wiktor Matuszewski
'py{}@wu{}em.pl'.format('wkm', 'ka') # email spam trap
More information about the Python-list
mailing list