Message Boards Message Boards

8
|
3220 Views
|
17 Replies
|
14 Total Likes
View groups...
Share
Share this post:
GROUPS:

[WSG24] Daily Study Group: Creative Computation

Posted 7 months ago

enter image description here

A Wolfram U Daily Study Group on Creative Computation begins on May 6th 2024.

Join me, Eryn Gillam, and a group of fellow learners to learn how to use Wolfram Language in creative ways. Our topics for the study group include creating computational art, computational poetry, audio visualization, and building two types of video games. Along the way, we'll learn how to code effectively in Wolfram Language.

No prior Wolfram Language experience is required.

Please feel free to use this thread to collaborate and share ideas, materials, and links to other resources with fellow learners.

Dates

May 6th-10th

11am-12pm CT (4-5pm GMT)

Register Here

POSTED BY: Rory Foulger
17 Replies
Posted 6 months ago

I remember years ago hearing that a tiny number of repeated perfect shuffles -- riffles -- can restore a playing card deck to its original order? How many? It takes seven shuffles; this is a pretty easy thing to do in Mathematica:

NestList[Riffle[Take[#, 26], Drop[#, 26]] &, Range[52], 8]

Next, I attempted to show graphically each of the intermediate shuffled decks -- far better eye candy than showing a list of 52 numbers. Fortunately Wolfram provides a means of displaying a graphic of a deck with a Resource Function:

ResourceFunction["PlayingCardGraphic"][Riffle[Take[Range[52], 26], Drop[Range[52], 26]], 
 CardSpreadAngle -> 0, ImageSize -> 1000]

deck riffled once

One thing I learned during this exploration was how to apply an option of a Graphic to a ResorceFunction that doesn't provide that option. The "ImageSize->1000" is passed straight to the Graphic constructor. Without that option, the 52 cards get crammed together into an unreadable scrawl. :(. I then tried to apply the card-display function repeatedly with a NestList:

NestList[ResourceFunction["PlayingCardGraphic"][Riffle[Take[#, 26], Drop[#, 26]], CardSpreadAngle -> 0, ImageSize -> 1000] &, Range[52], 1]

This doesn't work. I want to pass the numeric list through the iterations of NestList, but I want to display the Graphic on each iteration. This strikes me as something that should be easy, but I'm missing a bit of understanding to do it. I've attached my Notebook to the end of this message. Please assist. Thanks.

POSTED BY: Phil Earnhardt
Posted 6 months ago

This class is fun. It ranges from beginning basics to intermediate concepts, and the activities/projects leave plenty of room for creative expansion.

I am sharing my own solution to the first three projects. I stick mostly within the prescribed parameters and then push each project just a little beyond. These links take you to a cloud version of my solutions, where they do work, but I recommend downloading them to run on your desktop. That's especially true for Project 3 which takes a long time to render on the cloud (like 2 minutes).

Project 1

Project 2

Project 3

POSTED BY: Mark Greenberg
Posted 6 months ago

I'm seeing a wonky behavior in the framework. If I go back to Quiz 4 in the framework, my score is there. However, the correct answers are erased. Reloading the webpage doesn't change this. Closing all webpages and flushing every wolfram-cookie in my browser doesn't change this. Rebooting my computer (M1 iMac) doesn't change this.

I'm running Sarari on the iMac. If I open to Quiz 4 in Chrome, the answers are filled in. If I open with DuckDuckGo, the answers are filled in. If I run Safari on a different computer (M1 MacBook Pro), I'm able to see my answers to Quiz 4 filled in. Strange! Is the framework doing anything different for Quiz 4?

POSTED BY: Phil Earnhardt
Posted 6 months ago

I find it clever the way that you have made the videos. The narrator (Rory or Eryn) is talking while the code is being written, but the narrator is not the one typing the code. This is a step up from the usual live coding approach where the audience has to wait as the narrator switches focus from typing to presenting; or the premade code approach where the audience has to try to read chunks of code and listen to the presenter at the same time. Bravo! It is easy to follow your presentation and read the code.

POSTED BY: Mark Greenberg
Posted 6 months ago

It appears to me that the first question in Quiz 5 scores incorrectly.

POSTED BY: Mark Greenberg
Posted 6 months ago

Hi, Mark. FWIW, problem 1 in Quiz 5 looks correct to me. One and only one of the statements is incorrect, and the scoring-bot agreed with me. You can e-mail me the specifics of what you think is incorrect.

OTOH, Problem 7 in Quiz 5 appears to be incorrect. I ran the code in the scratch window and I did not see the expected behavior. After getting it scored wrong, I guessed the correct answer. The code still didn't run correctly in the scratch notebook. [Being deliberately vague to avoid spoilers.]

Problem 11 on Quiz 5 is a really good question! It required thinking. I wish more questions like this were like this on the quizzes.

On Problem 4 on Quiz 5, I got the right answer. However, when I tried to run that code, one of the cases would not run correctly. I'd appreciate if @Rory || @Eryn would see if they see the same thing running manually. [Being deliberately vague to avoid spoilers. DM me if you need to see what I'm seeing.]

POSTED BY: Phil Earnhardt
Posted 6 months ago

Hello Rory,

This study group is entertaining and covers material not explored in other study groups. One favorite is keyboard shortcuts: they are a great timesaver that every user needs to know.

I found two problems :

  • The link in yesterday's email for the study group materials is broken.
  • Quiz 5, problem 3: the correct answer is marked as wrong.

"See" you at 11:00!

POSTED BY: Updating Name
Posted 6 months ago

How can I access the framework??? I can't find anything on it and have no idea how to proceed with the out-of-class assignments.

POSTED BY: Alex Rosenzweig
Posted 6 months ago

Hi, Alex. This link was in the Chat part of yesterday's webinar.

I think that's what is meant by "framework". There you can watch the videos and recordings, read materials and take quizzes.

Hope this helps,

Mark

POSTED BY: Mark Greenberg
Posted 6 months ago

The link to the framework was shown in the Chat area of the BigMarker session. Wolfram doesn't announce the link in the public community discussion because they only want students enrolled in this course to be going through the exercises and quizzes right now. Unfortunately, some might not realize that they need to stash away that URL during the class session.

@Alex, the link was at the top of the chat window with a light blue background. I went through two whole sessions of an earlier course and could never see it; the instructor had to highlight the area of the screen for me to find it. This was somewhat of a "see a tree in the forest" thing; I felt pretty silly. The blue background is intended to emphasize the link. Unfortunately -- for some of us -- the blue background makes the link less readable. I have some difficulty seeing characters crisply on a display and I don't have an eyeglass prescription to help with seeing small text clearly. I'm not sure if these young whippersnappers know what we're up against sometimes. Grumble. :)

I do wish they would put the link in the non-blue area. Or maybe -- gasp -- put the link twice in the Chat window: once in the blue area and once right below it.

POSTED BY: Phil Earnhardt
Posted 6 months ago

Some tips I remembered tonight:

One cool detail of the Wolfram Language & System Documentation Center is searching on a shortcut. If you put a shortcut into the search box (e.g., //, #, &, /@, etc.) you will go to a page documenting both the shortcut and non-shortcut forms of the shortcut.

Doing the non-shortcut form -- invoking the function with no shortcuts -- is essential to mastering the shortcut. I like saying the full name of a shortcut to myself whenever using one.

The documentation can be brought up as a window in the Mathematica App, or it can be found on the web at https://reference.wolfram.com/language/ . At different times, one way or the other will be better for consulting the docs.

When using the framework, there are times when it's easier to have one of the framework windows in its own tab. On the Mac, you can right-click in a window and select "Open Frame in New Tab". I'm guessing there is a similar way to do this on Windows and Linux.

NotebookDelete[Cells[]] will erase everything in the scratch notebook.

POSTED BY: Phil Earnhardt
Posted 6 months ago

Problem 5 in Quiz 1 of the Computational Thinking and Coding framework appears to be problematic. Problem 4 in Quiz 2 also has a problem.

Is this the way you would like to get feedback about the framework?

POSTED BY: Phil Earnhardt
Posted 6 months ago

Phil, I agree that Quiz 1, Question 5 is a problem. All of the answers are built-in symbols, not unassigned variables. One way to check this hypothesis is to try to assign them values:

Black = 1

If Black is an unassigned variable, then the assignment will work, otherwise you'll get an error message that says "Symbol Black is Protected".

Probably one of the answers is supposed to be lowercase.

POSTED BY: Mark Greenberg
Posted 6 months ago

Quiz 2, Question 4 seems okay to me.

CORRECTION: Now that I've gotten my score for Quiz 2, I agree that there is a problem with Question #4.

POSTED BY: Mark Greenberg

Hi there! Ah, I agree on Quiz 1, Question 5. It's much more misleading than we intended. The question is actually referring to what color the notebook shows an undefined variable (ie with syntax highlighting). I'll get that question edited for clarity.

Thanks for the feedback! I'll have a look at Quiz 2 question 4.

POSTED BY: Rory Foulger

Greetings! Thanks for pointing this out - these quiz questions and some others have been updated!

POSTED BY: Rory Foulger
Posted 6 months ago

Dear Rory, The issue with problem 4 in quiz 2 still persists as checked a few minutes ago.

POSTED BY: José Dordá
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