I am new to Mathematica. Just trying to test a simple loop example:
Do[Print[i^2], {i, 4}]
It is a copy/paste from a published example with an expected outcome
1
4
9
16
Instead Mathematica output displays something different, please see the attached.
Your help will be highly appreciated
Thanks,
Larry
Hi
It would seem you are trying to input it in free-form input. Just paste the code directly onto the page at the flashing cursor, don’t click on the little + tab.
Hi Paul - thank you for the prompt response.
If I paste the code as you suggested and hit the enter button, the cursor moves to the next line and I see no Output. The only way I discovered to generate an output is to start with “=”. This seems to switch Mathematica into the free-form input
Your help is highly appreciated. Larry
it is Shift+enter while the cursor is anywhere in the code, unless you use the keypad (separate part of main keyboard), then you can just hit enter.![]()
Paul - Thank you again!
Much appreciated. Is there any “Get Started with Mathematica” where these simple things are covered? A book or other materials you can recommend for a quick start?
Larry, All I use is the built in documentation, hit Help and choose Wolfram Documentation, pick a topic, all links go to examples and they are copy and paste-able. Start with System Operation & Setup, and choose notebook interface, will give you a heads up start.
P.
Larry, go into the Help system and search for “Virtual Book.” It’s good for getting started.
Thank you David