Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I see multiple results in a Jupyter notebook?

14 views
Skip to first unread message

peter....@gmail.com

unread,
Apr 30, 2023, 6:24:30 AM4/30/23
to
I already addressed the topic in the last post, but apparently it is not directly connected with "print". So how do I see the output of these lines?

egf := (1 + x*exp(x*z + z))/(x + 1);
c := n -> normal(n!*coeff(series(egf, z, 9), z, n));
for n from 0 to 6 do
seq(coeff(c(n), x, k), k = 0 .. n);
end do;

What I expect is:
1
0, 1
0, 1, 1
0, 1, 2, 1
0, 1, 3, 3, 1
0, 1, 4, 6, 4, 1
0, 1, 5, 10, 10, 5, 1

What I get is:
0, 1, 5, 10, 10, 5, 1

This is just unreal!


Rainer Rosenthal

unread,
Apr 30, 2023, 9:57:26 AM4/30/23
to
Am 30.04.2023 um 12:24 schrieb peter....@gmail.com:
> ... it is not directly connected with "print".

I think it's connected indirectly.
the expressions in your loop are printed without line feed.
Try to add a second statement in the loop body.

Cheers,
Rainer



peter....@gmail.com

unread,
Apr 30, 2023, 10:24:24 AM4/30/23
to
> > ... it is not directly connected with "print".
> I think it's connected indirectly.

Sure, ultimately all characters are sent to a device, but please not to /dev/null !

> Try to add a second statement in the loop body.

Ok, so I inserted print("?\n"); in the loop body.
The surprise is that this (and only this) can be seen in this case:
"
🤔

Rainer Rosenthal

unread,
Apr 30, 2023, 1:08:41 PM4/30/23
to
Well, at least SOMETHING changed :-)

Greetings,
Rainer

0 new messages