Group Abstract Group Abstract

Message Boards Message Boards

6
|
15.7K Views
|
23 Replies
|
20 Total Likes
View groups...
Share
Share this post:

[WSG22] Daily Study Group: Writing a Wolfram Language Function

Posted 4 years ago
POSTED BY: Daniel Robinson
23 Replies

Thank you. I did not get it, but it is already discussed above. :( :)

Could you please post the link to the quiz.

We will be sharing the link to the quiz during the Study Group session and will also include the link in the reminder emails for the live sessions as well as the recordings.

Quiz: For some reason the autograder does not work for me.

POSTED BY: John Burgers

Ooops! Thanks. Is this an error, or a new policy?

Posted 4 years ago
POSTED BY: Rohit Namjoshi

Hi Rohit, I can confirm autograder is accepting the right answer for #8.

Posted 4 years ago

Hi Abrita,

I cannot post my answer here so I created a cloud notebook with my answer and shared it with you. Check your gMail email.

Thanks, Rohit

POSTED BY: Rohit Namjoshi

Thanks for your thoughtfulness about sharing answers. I'll take a look.

You can retrieve cloud code with CloudGet or CloudImport:

obj = CloudPut[Hold[f[x_] := x^2;], IncludeDefinitions -> True];
ClearAll[f];
ReleaseHold[CloudGet[obj]];
f[3]

(I included the ClearAll[f] to be absolutely sure that the definition for f was being pulled from the cloud and not locally.) If you then wanted to save the definition of f locally, you could save the output of Definition[f] to a file.

Also, you can download the source code of a resource function by clicking the 'Source Notebook' button. And while resource functions are not "official" Wolfram Language functions, many are provided by Wolfram staff and are quite robust.

POSTED BY: Daniel Robinson
Attachments:
POSTED BY: John Burgers
POSTED BY: Daniel Robinson
Attachments:
POSTED BY: John Burgers
POSTED BY: John Burgers
POSTED BY: Daniel Robinson

Thank you Daniel, that helped me understand how to determine what is assigned to options. No need to worry about what I meant by parsing, you provided all the information I needed. John

POSTED BY: John Burgers

Hello Daniel,

On second sober thought (less foggy mind this morning), Looking again at the Alternatives documentation it does say ... represents any of the p's , which with a little extra thought includes that a single p be tested.

So up to you, but I'd now be happy that the lesson workbook stay as is.

Thanks again. John

POSTED BY: John Burgers

Some additional resources (Especially for beginners in the Wolfram Language):

  • Defining Your Own Functions -- a video lesson from the interactive course An Elementary Introduction to the Wolfram Langauge (Please sign in with your Wolfram ID to access free interactive courses on Wolfram U)
  • Function Definitions -- a chapter from the online tutorial The Wolfram Language: Fast Introduction for Programmers

This is a reminder that Daily Study Group: Writing a Wolfram Language Function begins on Monday, September 12. It runs for just one week. Register today: https://wolfr.am/16funYdYF

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