Message Boards Message Boards

GROUPS:

Free online training offered with 8-session programming tutorials

Posted 5 months ago
2583 Views
|
39 Replies
|
19 Total Likes
|

Users of the Wolfram Language are fired up to improve their knowledge and skills, and we're bringing a series of programming tutorials to Wolfram U to help meet this need, starting on February 18. Sessions meet on Tuesdays and Thursdays, and a weekly quiz will be offered to assess your progress. Wolfram Technology Certified Level I will be awarded to participants who successfully complete additional assigned problems.This is an ambitious project with comprehensive content, and I'd love to hear what people think of it. Registration is open now.

39 Replies

We were very happy to host a number of newcomers to the Wolfram Language at the very first session of the tutorial series. Here are some of the poll questions that the attendees were asked to answer during the session:

Which of the following will create a list of the first 100 cubes?

  • Table[i^3,{i,1,100}]
  • Table[i,{i^3,1,100}]
  • Range[100]^3
  • Both 1 and 3

What is the Head of the expression 10 + 20 I?

  • Integer
  • Number
  • Complex
  • None of the above

Which of the following lists contains only atoms?

  • {a+b, 23, "hope"}
  • {23, 3 + 4 I, "tomorrow"}
  • {200.23, f[10], 5/6}
  • {100.0, $MachineID, x = 10}

How can you convert an Association into a List of Rules?

  • ToList[assoc]
  • Normal[assoc]
  • {Keys[assoc],Values[assoc]}
  • This is not possible

Thanks to the tutorial participants who reported a problem with scoring for Quiz 1. We have identified an error with the scoring, and it is now fixed. We apologize for the problem. If you attempted the quiz earlier, please reload the quiz notebook (to be sure that you have the latest version) and try it again.

Here are a few more review questions from session 2:

How can the following be re-written using PatternTest?

x_/;EvenQ[x]==True

  • x_/;?EvenQ
  • x_?EvenQ==True
  • x_?EvenQ
  • x_EvenQ?

Which pattern correctly captures the substrings starting with "a" and ending with "c" from the string "aaabcdeadc"?

  • "a"~~"c"
  • "a"~~~~"c"
  • "a"~~_~~"c"
  • "a"_"c"

How would you set the option to select all possible substrings from "xyz"?

  • No option is required
  • Set Overlaps to All
  • Set Overlaps to True
  • All of the above

Review questions from Session 3:

Flow control with multiple branches can be achieved using:

  • Nested If statements
  • Which
  • Switch
  • All of the above

Which of the following is an example of a pure function that accepts two arguments?

  • #^2+#^3 &
  • #1^2+#2^2 &
  • #x^2+#y^2 &
  • None of the above

Having defined exp1=Sin[x]+Cos[x], which of the following will compute the value of exp1 for x = 10.0?

  • Module[{x=10.0},exp1]
  • Block[{x=10.0},exp1]
  • With[{x=10.0},exp1]
  • All of the above
Posted 4 months ago

I have downloaded the notebooks for the first 4 lessons. I can open the first two without any problems. When I open #3 or #4 the window doesn't show although the Windows task bar shows an open window. When I kill the window a flashing image of a window rushes in from the right off-screen as it shrinks rapidly to nothing. Have the notebook windows been saved with settings used in the live seminars? ............. puzzled .............

Hi Douglas, Does the Window -> "Bring All to Front" (or Window -> Arrange Windows -> Tile Vertically) menu option, in Mathematica/Wolfram Desktop, work to bring the notebook windows within view? Notebooks #3 and #4 were saved with similar settings as #1 and #2. Thanks.

Posted 4 months ago

Yes, Cascade Widows made them accessible.
Oops, I have to save 3 and 4 to keep accessibility permanent.. 3 and 4 are in a nice slideshow arrangement with a << <-> >> navigation bar at the top. 1 and 2 are regular notebooks with navigation by scrolling up and down

Thank you,

Doug

Posted 3 months ago

Looking through the exercises, am not sure about the intent of item #1.12: Write a function greatestCommonDivisor ...

The question seems to suggest this is a one-line exercise. Of course, using the GCD function in Mathematica would be trivial -- so the intent must be something else. But writing a function to find the GCD is probably not a one line exercise, as described here: wikipedia page for GCD.

Can you expand on the intent of this question? Thanks!

Posted 3 months ago

I also would appreciate if organizers clarify item 1.12.

There absolutely is a one-line solution using recursion and Euclid's algorithm.

Posted 3 months ago

Dear Viktor, Thank you for your comment. You are absolutely right, but this is a training for beginners. As I know (found) the correct answer, I am positive now that implementation of Euclid's algorithm is not expected in item 1.12. I realized that organizers provided a clue, but still believe that a more clear wording would be useful for the tutorial participants. Best regards. Alexey.

Do you have the links for the last quiz and he exercises?

Thanks.

george

Sending them to you over email.

Hi there! I'd like to recieve that email too, if it's possible. Thanks!

All programming tutorial participants will receive an email on March 26 listing all four quiz links and the link to the exercise set. Quizzes and exercises are due April 2.

Hi, I just discovered this but wish I had earlier. I know I won't be able to take part in quizzes and exercises but can I get recorded sessions. It will be a great help.

Yes! The eight recorded sessions and the lecture notebooks are available here: https://www.wolfram.com/broadcast/c?c=471

Click on an individual video to access the download link from the control bar.

Thanks a lot!

Posted 3 months ago

Regarding the exercises, should all answers be submitted at once, or can submitting answers be spaced out over several days and several sessions?

Hi!

I'm about to end my exercises but I cannot make it with the 4th one. I've tried to use SetAttributes and Listable, but it doesn't work out. May I ask for some help? Thanks,

Lluís

@Robert McHugh: Each exercise question is graded individually when you hit th e"Check my solution" button/link. So you can space out your submissions over several sessions.

@Lluís Pastor: Try setting the attributes of myListable function first and then define it.

Hello everyone.

I have some troubles with 1.4. I get the same output as the exercise does, but I do not get the correct answer. I am using as entry value of the pure function a Range[26] list so I can make every 26 columns that I need.

I think the problem may be the entry value. Maybe it has to be Alphabet[], but I do not know how to write it. My code right now is:

Column[{Alphabet["English", "IndexCharacters"][[#]], Alphabet[][[#]]}, Frame -> True, Background -> RandomColor[]] & /@ Range[26] // Row

Thanks

I also got the right response, but was marked wrong. I suspect that there are a lot more ways to solve this problem than the (automatic) grader knows about. I sent an e-mail to wolfram-U showing what I did (for this and other problems) but have not received a response. If there are only 80 or so people working on the exercises, it shouldn't be too hard for a human to eyeball the responses.

For what it's worth, your code is substantially different from mine, but it also produces the correct output.

My observation is that the problems for which you could construct a Unit Test seem to be graded fine, but the others -- including this one -- are sometimes problematic.

Yeah, that would be great.

I hope the Wolfram workers help us with that question. We have to get the 20 correct answers in order to pass the Exercises, right?

And George, if you don't mind, can you write your code? I get curious when you said your code was very different.

Not sure how many correct is needed for the certificate, but I do this just for the experience.

Not sure it is legal to put code here, but since it is a wrong answer, it couldn't hurt.

Row[Map[Column[{ToUpperCase[#], ToLowerCase[ #]}, Frame -> True, 
Background -> RandomColor[]] &, Alphabet[]]]

This is even more efficient, since Alphabet is already lower case:

Row[Map[Column[{ToUpperCase[#], #}, Frame -> True, 
    Background -> RandomColor[]] &, Alphabet[]]]

typical output

One more thing: I am using 12.1(desktop macOS), and we know that at least some of the quizzes were made with 11.3. There may be some subtle differences -- the developers have been working on updating the parser, for example -- that may create some differences in the code.

Thank you!

I'm sorry if you get in trouble as you put your code here. But I also think that as this code is wrong there wouldn't be a problem.

As I suspected, you use as argument Alphabet[]. So simple! I don't know why your code is wrong. Now I know mine was.

I hope we can get some help!

but I do this just for the experience.

Yeah! I see these exercises very entertaining and original.

I am using 12.1(desktop macOS)

I'm also using v 12.0 (Linux)

Your code produced a correct output, so it was not "wrong". It may not be as elegant as it could be.

Hi George, your code almost matches the wanted answer but you didn't use the exact functions specified in the question. That is why your output is very close to the correct one but doesn't match it. Let me give you a hint: (In the question it is written Framed not Frame)

Pretty Close huh :)

Good Luck

Framed is not 'legal' in this context in 12.1, which I am using. It shows red and gives an error.

Hi George

Framed is a function, not an option, please look it up, and I am sure you will make it work. I tested it myself on 12.1 and it works.

ok -- it used to also be an option (Using WL since version 1.1). However, what I wrote gets the same job done. I should point out that several of the 'suggestions' in the questions specify illegal operations, so I can't rely on them for hints on how to write the code.

The real point is that there are multiple ways to achieve a goal when coding. This was true in c and assembler, and it is true in spades for WL. The questions that appear to use some form of Unit Test presented no problem for me, even though I am sure that in many cases, my code is different from what the designers expected. This is because it relies on matching expected output to actual output.

The passing grade for the exercise is 70%, so you should get at least 14 of the 20 correct.

If you are finding issues with the auto grader marking your answer wrong, even though you have produced the exact output as shown in the expected output, please feel free to email your solution to Wolfram U (wolfram-u@wolfram.com).

Thanks. I already have (twice)

Thanks. I already have (twice)

Very much appreciated, George!

Posted 3 months ago

Hi, How can I download the exercises as a notebook?

Thanks, Dan Chevion

Posted 3 months ago

I had some minor issues with Exercises 1.7, and 1.18

1.7 Same issue as pointed out above by Daniel and George.

1.18 The code does the job, finds Geodistance and reports it in Km, not sure why it is interpreted as incorrect.

I have to say that I really enjoyed the Exercises. It has been a while since I had fun with coding! Thanks for the course and the tutorials.

Thank you to everyone who participated in the Programming Tutorials and submitted quizzes and exercises. We were excited to see so many folks engaged in the discussions and also appreciate the valuable feedback we received.

We understand some of you faced some issues with the exercises and quizzes. We apologize for any inconvenience and will be working on addressing these issues.

We'll be reaching out to the participants with your certificates. Hope to see you at or next offering.

Feel free to check out our new daily offering of Wolfram Study Groups where right now we are going over the Elementary Introduction to the Wolfram Language course from Wolfram U.

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