Message Boards Message Boards

GROUPS:

Verify if inputs are written in a proper manner?

Posted 4 years ago
6122 Views
|
13 Replies
|
8 Total Likes
|

Hello. I recently started the elementary intro and was wondering why there is no way to check inputs unless I am missing something. It seems very counter intuitive to not have a way to verify if your inputs are done in a similar manner or different. Also, if I get stuck an expected output does very little for me.

Thanks

13 Replies

Hello Blainne, could you post some code or more details? When you write a function you can check that the inputs are as expected by using patterns.

Thank you for the reply back. I am specifically talking about the elementary introduction / programming lab examples.

https://www.wolfram.com/language/elementary-introduction/07-colors-and-styles.html

So if you scroll down to any of the 7.1+ Exercises on this page you notice it has an "Expected Output" and a way to check your answer. Unfortunately, I do not see any way to check the input / code for any of these exercises. This is an elementary introduction so obviously it would be beneficial for me to check if I wrote my code in a similar fashion or different. Also, if I get completely stuck I have no example to go off with just an output / answer check.

I hope this explains my problem.

I now understand you. You are right. Take for example problem 7.2. I suppose that I enter this as the solution:

TableForm[{{Red},{Yellow},{Green}}]

And the system tells me that it is wrong. So then you know that there must be a better way to do it but you are unable to see that a better solution would be Column[{Red, Yellow,Green}]

I agree that they should give you the option of seeing the input code or codes that were expected.

Is there any way we can escalate this to an admin? It seems quite ludicrous that they make a guide for beginners that I can guarantee you will deter ANY beginners trying to learn this language..

I can't even get basic things done due to this..

Example: "Make a graphic of a purple cylinder."

It took me 30 minutes trying to figure out a simple problem due to the lack of info in an elementary introduction. Turned out I had a misplaced bracket that was not highlighted.. Yet it took me 30 minutes to figure this out instead of being able to look at an example... atrocious and unacceptable.

What would you recommend I use to learn Wolfram Language since it's own resource is completely unusable for me. Any advice would be greatly appreciated. I want to learn how to create applications and express general creativity etc.

What would you recommend I use to learn Wolfram Language since it's own resource is completely unusable for me.

Hello Blainne,

one of the many advantages of Wolfram Language is that it comes with an excellent documentation. There are tons of significant examples which can be executed, variations can be tried out. This even can be done inside the documentation - which itself consists of notebooks. This all is perfect for learning! If you need kind of a guided "red line" for the beginning, you can use the "virtual book" (as I did!). Up to MM v9 this had been placed on a distinct location inside the help menu. In v10 it is somewhat hidden, but it still exists: Open a help window and search for "virtual book". Working through the chapter "Core Language" is indispensable - but it definitely pays! And then you will appreciate the mentioned "Elementary Introduction ..." much more.

Regards -- Henrik

Your suggestion of using the Documentation is of course spot-on, but I'm not so sure about the Virtual Book... Isn't that gone from the menu because it's outdated by now? For instance, the chapter on the Core Language contains Lists and Rules, but no Associations. If you instead just open the Documentation and click on the "Core Language & Structure" panel, you do get Associations, so I'd say that's a better starting point. However, in general I still think that people who already know how to program in other languages are best off with the Fast Introduction for Programmers and then using the Documentation for whatever they need. For people who are completely new to programming in general, the Elementary Introduction looks like a great option, since many other books on the market right now are targeted specifically at a technically-minded audience (think college-level STEM students).

Thank you for the good advice.

Did you see the "Answers to Exercises" chapter at the end of the book? It has all the expected input, or at least one possible version that will work.

I understand your frustration that the problem with the purple cylinder took so long to solve and then it was "just a silly bracket". But getting better at spotting these kinds of issues is a large part of learning to program in most languages. So even with the printed solution at the end of the book, you still have to read and compare your code and the solution carefully until you get a better grasp of these details. (But it will happen faster than you think, don't worry.)

And if you really do get stuck, just post here on the Community forum with that concrete problem. We don't bite anyone's head off unless they're clearly and blatantly trying to get us to do their calculus homework. ;)

Just out of curiosity, can you point to a learning resource for programming (in any language) that you think is didactically better suited for beginners? I have no background in education, so I feel I can't judge teaching material particularly well unless I'm currently trying to learn from it... I'd be interested to get that sort of input, because the Elementary Introduction looks pretty good to me, with the caveat that I already know the material.

Edit: Just in case you haven't seen it yet, I thought I'd drop the ultimate collection of reference links here as well so that you can hunt for other resources if you want to.

Thank you for the reply. I did not see the "Answers to Exercises" in the back of the book I will have to check it out online. As far as teaching materials go I have always just used youtube and what ever info is available / recommended by the community. Instead of quitting I just moved on to another chapter / find something new to review / watch wolfram videos online. I certainly am determend to learn but I feel like I am spinning my wheels and not grasping core concepts. I will definitely read through some more and keep trying my best to learn.

This community has been very helpful so far and I am grateful for that. Any other general advice for a beginner?

Just this week we rolled out our feature for checking answers to exercises on the Elementary Introduction to the Wolfram Language web site:

Screenshot of exercises heading and button

In another few weeks our cloud system will be updated to allow for tabulating and saving all your work. Besides our documentation on reference.wolfram.com, I suggest the Fast Introduction to the Wolfram Language as nice starting point if you are familiar with programming concepts in general:

http://www.wolfram.com/language/fast-introduction-for-programmers/

along with various video tutorials, like our Hands on Start series:

http://www.wolfram.com/broadcast/c?c=141

We are currently in the midst of updating our learning center site, which should become the ultimate starting point (soon), but another great place to start, which I highly recommend, is the Wolfram Language .org site which gathers resources from all over the world:

http://wolframlanguage.org

Thank you for the reply. I will certainly check out the Fast Introduction after I am done with elementary and the videos are right up my ally since I am a visual learner. I have been using some of the resources on wolframlanguage.org but I feel like I am not learning the core of the language and more just random examples which I guess does eventually build up into a foundation.

I will keep trying and learning as I progress and I appreciate the info and will certainly use it.

Edit: I have gone through the first two videos and it helped tremendously. I feel like elementary intro does not cover some of the basic starting points like formatting / some of the options that can help expand my understanding.

Quick question if someone is willing to answer:

1) What does the indenting signify / mean in wolfram. I understand it can make code easier to read but does it serve another purpose? Where can I learn more about this.

2) I was trying to write a string into the code in example 5 and was unable. {Hello World!}. How would I edit this code to accomplish this.

Example 5 in Circlescapes since the formatting is not carrying over, sorry.

Share It — Make a website that gives a different “circlescape” each time it’s visited https://lab.wolframcloud.com/app/objects/1ac43990-85de-4c46-9804-236a78d261e3

I'm glad to hear the videos work out better for you! You're right, everyone learns in a different way, so it's great to see the pool of resources growing.

As for your questions: Indentation is really just there for readability, it doesn't affect evaluation. If you use a Notebook locally or in the cloud, indentation is done automatically if you do linebreaks. So you can just hit return where it makes for you in terms of readability. You'll figure out where linebreaks work best for you, and you can look at other people's code to get a few ideas. (But it really only matters once your code gets longer.)

I'm not quite sure what you're asking in your Circlescapes question, are you trying to put text over the image, or do you want to display text instead of the image? Putting text over the image would work like this:

CloudDeploy[
 Delayed[ExportForm[
   Graphics[
    Table[{RandomColor[], Opacity[.5], 
      Disk[RandomReal[10, 2], RandomReal[1.5]], 
      Text[Style["Hello World!", 30, Darker[Red]], {Center, 
        Center}]}, {100}]], "PNG"]], "Permissions" -> "Public"]

As you can see, I added a Text object, which is really just like a Disk or any other graphics object. I used Style to give it a text size and a colour, and then {Center,Center} to center the text inside the image - you can put it at other positions as well.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract