Message Boards Message Boards

6
|
50593 Views
|
163 Replies
|
143 Total Likes
View groups...
Share
Share this post:

[WSG20] Programming Fundamentals Week 4

This week we will be looking at the following topics:

  • Tuesday May 26: Dataset
  • Wednesday May 27: Package Development
  • Thursday May 28: Workbench
  • Friday May 29: Useful Tips and Session Wrap Up

Please post your questions on this thread and look out for daily challenges.

163 Replies

Hello, we are in the process of grading the Level I exercises from this study group and will be getting back to you shortly. Thank you for your patience.

Hi Abrita, I didn't receive any email with level I Certification up to now

yep same for me, i don't know if i failed or not

Hi Muhammad,

as I understand you have to make association array Name of gen -> Secuence Length, in other way does not work because the different gens have same number of nucleotides (secuence length) and in case sorting with KeySort the program delete from list ones with same numbers. Then you have to sort them and select first five genes and then reorder it in each list. You will get exactly answer as in exercise. In my case autograder did not accepte it so I send all my solutions by email. Good luck

POSTED BY: Vitaliy Reznikov

Submission deadline for Level I exercises have been extended to 11:59 PM, Friday June 26th 2020. We have received many submissions over email as well. We will start grading them after everyone has had a chance to submit. Thank you for your patience. We will get back to you individually once the grading process is over.

Posted 4 years ago

@Abrita Chakravarty

Do I automatically benefit from updates in auto-grader or have to delete and download the notebook again?

My solution for 1.11 was previously accepted by the auto-grader but now running the same code today, it is not getting accepted. Also, the question is underspecified since there are multiple genes with the same sequence length so a tie-breaker rule is needed. If I use TakeSmallest[...,] vs TakeSmallestBy[...] vs Take[SortBy[...],...] vs Take[Sort[...],...] the ties are broken in a different way.

POSTED BY: Muhammad Ali

Muhammad Ali We recognize the issues. Please don't worry about the changes. Your original answer has been accepted as a correct submission.

Hi @Angel Adrian Rojas Jimenez please email your solutions to wolfram-u@wolfram.com. We do not want the solutions posted publicly as yet. Thanks.

Hi Abrita, I misunderstood completely the email you sent me. I'm very sorry. I already did it a week ago but today I received the e-mail which makes me confused. My apologies, Angel

Hello Wolfram U team, I attach my solution to the exercises as you suggested to grade manually. My Wolfram ID is linked to angel3921@live.com email.

Kind regards, Angel

Yes, defenetly it is very nice idea. I thought to solve this problem by two cycle of While or Do or For loops but this is better and it work. I did first my list of five characters in order required in the exercises. and that I think half of solution..

thank you so much for your help.

POSTED BY: Vitaliy Reznikov

thank you so much for your response and these ideas. I will try to solve it in this way.

POSTED BY: Vitaliy Reznikov

Here are some hints for problem 1.4:

Pick a random element from a list:

RandomChoice[{1,2,3,4,5}]

Get the letters of the Alphabet:

Alphabet[]

Get a list of elements from a longer list, that is not present in a shorter list:

Complement[{a, b, c, d, e}, {a, c}]

Alternate elements from two lists:

Riffle[{1, 2, 3}, {a, b}]

Join characters to form a string:

StringJoin["a","b"]

Do something n number of times:

Table[StringJoin["hello ", i], {i, {"a", "b", "c"}}]

Hi Abrita,

thank you for your reply. Yes, this example cleared for me something, I will try to figure out how it can use to solve exercises 1.4. I need to put one "if" inside other and so on and map it through list of RandomCharacters. I think it little bid complicated. Additionally, I have to put this structure inside one Do or For cycle. I have no idea if this possible. Does anybody can give me some idea how to do it?

Thank you in advance,

POSTED BY: Vitaliy Reznikov

Does this example help?

If[#>5,"Big","Small"]&/@ {10,8,6,10,8,5,6,8,1,9}
(* {Big,Big,Big,Big,Big,Small,Big,Big,Small,Big} *)

Hi Lori,

thank you for your response. I try to follow community thread but probably miss something. As I understand I have to send all my solutions to woflram-u@. Is it correct?

Also I want to ask for some question about "If" structure. How can I write secuence of expresssions which have to be executed if conditions is True or False, for example:

If[Length[d] <= 5, Print[i], d = Append[d, "a"]; Continue[]]

Expression with Append does not work in my case. I get stuck with that? Could you help me?

Thank you in advance for your response.

POSTED BY: Vitaliy Reznikov

I have same problem with autograder for some exercises. For example, for exercises 1.8, 1.11, 1.13, 1.18, 1.19 the program does not accepte correct answers. I say this because it correspond exactly what is put in “Expected output” or written in description of problem similar as people saying here. In the exercises 1.8 it´s very difficult to say what it should be expected output because for it exist variety solutions with different tricks which prevent correct estimation by autograder. I was send some of them in my letter at the beginning of present week (probably it sorted to Spam folder because it was without "Subject"). For exercises 1.18 expected output not that what is require for it. In my understanding, if we have to sort in the decreasing order first city in the list should be Honolulu that have the greatest distance between Washington, DC and rest of them. I checked that manually and with ListLinePllot. Also I got some issues with some other exercises. I’m going to send all my solutions to address which you pointed out. Best regards.

POSTED BY: Vitaliy Reznikov

Hello Vitaliy,

Read all of Abrita's post then you'll know everything you need to do. :D

POSTED BY: Lori Johnson

Yes, we will accept correct solutions that produce the expected output, even if the autograder marks them wrong. If you have such solutions, please email a notebook with all your solutions to worlfram-u@wolfram.com.

Hi, I am having also problem with some exercises. Actually in some I can get the expected output, but they are not approved from the Autograder. I am little bit confused from the discussion here. Will the solutions that are not approved from Autograder but can produce the expected output be accepted? Thanks Murat

POSTED BY: Murat Aydin

Wolfram released Mathematica 12.1.1 yesterday and it contain "almost a thousand bug fixes, feature enhancements and performance improvements" according to my upgrade email. I started to install it and noticed that the installer appears to wants to load it in the same directory as Mathematica 12.1 (C:\Program Files\Wolfram Research\Mathematica\12.1).

Mathematica 12.1 has been very stable for the functions I use and much faster than Mathematica 12.0. I'm hesitant to replace Mathematica 12.1 yet so I created a 12.1.1 directory for installation, but it appears that some of the Mathematica 12.1.1 install files are still going to be installed in the Mathematica directory 12.1. I'm further perplexed because the installer has an option to uninstall Mathematica 12.1

What does the installer actually do? How do you install Mathematica 12.1.1 in a way that leaves the previous version unchanged? I'm eager to test the new version to see how it performs before removing Mathematica 12.1.

POSTED BY: Jay Morreale
Posted 4 years ago

Hi Jay,

I have several versions of Mathematica installed on my Mac. When I want to install a new version I rename the old version e.g. Mathematica.app to Mathematica 12.1.app and then install the new version. This works fine on Mac OS, newer installs do not break older versions. Not sure if that will work on Windows.

POSTED BY: Rohit Namjoshi

The installer always offers an option to uninstall the older version of Mathematica if present. However you need not uninstall. Multiple versions of Mathematica should be able to co-exist on your system.

SameQ is another function to check for equivalence of expression. SameQ[expr1,expr2] returns True if expr1 is identical to expr2and otherwise returns False. Here, "identical" means there is exact correspondence between the underlying FullForm representations of expressions of expr1 and expr2.

So for:

Sin[Pi/2 - a] === Cos[a]
(* True *)

Sin[Pi/2 - a] // FullForm
(* Cos[a] *)

But for:

(a + 1)^2 // FullForm
(* Power[Plus[1,a],2] *)
a^2 + 2 a + 1 // FullForm
(* Plus[1,Times[2,a],Power[a,2]] *)

(a + 1)^2 === a^2 + 2 a + 1
(* False*)

It needs:

Expand[(a + 1)^2] === a^2 + 2 a + 1
(* True *)

Yes, this works in this particular instance, but I was thinking more of a general case. Suppose one wants to have a function with two arguments (for concreteness, let's say the two arguments are both mathematical expressions in one real/complex variable) which would return True if the two expressions are equivalent and False otherwise, similar to how an auto-grader would attempt to determine if two arbitrary pieces of code are equivalent. How could one go about writing a function like this in Mathematica?

I find it a little puzzling how Mathematica treats certain mathematical expressions. For example, Sin[ArcTan[x]]//FullForm produces Times[x,Power[Plus[1,Power[x,2]],Rational[-1,2]]]

and

Sin[ArcTan[x]+Pi/2] //FullForm produces Power[Plus[1,Power[x,2]],Rational[-1,2]] so some identities are built-in in FullForm and in how Mathematica treats the expressions. These examples lead one to expect that Sin[ArcTan[x]+Pi/4] //FullForm will be Times[Power[2,Rational[-1,2]],Plus[1,x],Power[Plus[1,Power[x,2]],Rational[-1,2]]] but instead one gets Sin[Plus[Times[Rational[1,4],Pi],ArcTan[x]]]. Both, Expand and Simplify leave Sin[ArcTan[x]+Pi/4] unchanged and the suggested approaches do not work for verifying that Sin[Plus[Times[Rational[1,4],Pi],ArcTan[x]]] and Times[Power[2,Rational[-1,2]],Plus[1,x],Power[Plus[1,Power[x,2]],Rational[-1,2]]] are equivalent.

Hi Slava,

The main idea behind the grader is to check for code equivalence. However there are always exceptions that need to be handled. We are still working on it and unfortunately do not have recommendations for best practices as yet.

The auto-grader is a new system we are trying out. Unfortunately we did run into some issues and we definitely appreciate the feedback we have received from the study group attendees regarding the various issues they have faced while working on the exercises.

Thank you,

Abrita

Ok, thank you. Here is a more specific question. Suppose I would like to check if two expressions are mathematically equivalent (this, of course, needs to be made more precise, but let's leave it vague for the moment). I looked at the Equal symbol, but, while it returns true for something like Sin[Pi/2-a]==Cos[a], it remains unevaluated even for something as simple as (a+1)^2==a^2+2a+1. What are the ways in which this question can be approached in Mathematica?

Posted 4 years ago

A couple of ways to do this

Expand[(a + 1)^2 == a^2 + 2 a + 1]
(* True *)

Reduce[(a + 1)^2 == a^2 + 2 a + 1]
(* True *)
POSTED BY: Rohit Namjoshi

Please note minor change to problem 1.11:

List the ten shortest genes ("SequenceLength" and "StandardName") in the human genome, sorted in increasing order of length. (Hint: Look up GenomeData.)

If you have already submitted a solution that was accepted for the "five shortest genes", please do not worry. It will still be accepted as correct.

Hi Abrita,

I am curious about how the auto-grader for Level I exercises works? Does it go through a list of all solutions that were deemed correct and tries to find a proposed solution in that list? Or, do you use a different idea? This question is motivated not only by the frustration of trying to satisfy your auto-grader, finding multiple solutions to several of the exercises which produce the expected output only to have them rejected by the auto-grader, but also by my interest in using Mathematica to create auto-graded math quizzes for my students. Are there any tutorials or guides on how to create such quizzes and how to make sure that different solutions or different equivalent forms of an answer are accepted?

Thank you.

Slava

i am having a problem with 1.19

when i run my answer on my local pc i get the correct result but on the cloud i get the message error "TextRecognize:Expecting an image,a graphics,or a list of them instead of img" which makes zero sense since i have already evaluated the previous cell with the preloaded image.

Another issue appears when i try to run 1.14, i have tried with both If and Switch to implement the rule and i get the correct result on BOTH my local machine and as an answer on the exercise notebook but the result is not approved

Hi Pasquale, Please email your solutions for 1.14 and 1.19 to wolfram-u@wolfram.com

Posted 4 years ago

For Q 1.6, what is the except output? 10 times? or 100 times?

POSTED BY: Zhengkun Liu
Posted 4 years ago

Dear Wolfram TEAM,

To achieve the Level I certification, how many questions must we successfully answer?

POSTED BY: Zhengkun Liu
Posted 4 years ago

Hi Zhengkun, We are looking for a 70% score so 14 out of 20

POSTED BY: Updating Name

There is a temporary issue on the forum confusing people names. It will be fixed shortly.

POSTED BY: EDITORIAL BOARD
Posted 4 years ago

For item 1.12, I have tried three different ways that successfully produce the expected output, yet the autograder says that I need to try again. Maybe I do not understand the problem. The output is a list, as indicated by Head[%], and the primes are styled in Red.

POSTED BY: Updating Name
Posted 4 years ago

I experienced the same problem. My solution generates a result that is identical to the "Expected Output", but it is not accepted. This is not an isolated issue, there are several problems with the same issue. I have given up on trying to figure out exactly what the auto-grader is looking for. I am just going to mail in the notebook with my answers.

POSTED BY: Rohit Namjoshi

In my case, the auto-grader accepted 19 from 20 solutions, with exception of exercise 1.13. There are some very strange solutions, for example, the solution may use a syntax that does not correspond to documentation (one item) .

For item 1.12 I have used If[] as a pure function, Map (/@) and Style.

.

Posted 4 years ago

I am on 18/20 and I can't find 1.8 in addition to 1.13.

Update: Just figured out 1.8 also a trivial change in a call to RandomReal matched with the autograder.

POSTED BY: Muhammad Ali

Hi, Muhammad,

A little earlier, I have mentioned exactly the case of item 1.8. Try an obvious modification of your present code. There is no need to construct another one. And the code needs to be appropriate to beginner's level with Table!

Posted 4 years ago

I've encountered another strange situation. When I try my code for exercise 1.19 on the exercises page, no text is found. However, if I copy the code (including the image) to Mathematica 12.1 desktop, everything works as expected (both words highlighted).

Has anyone else seen this (or similar) behavior? Thanks.

POSTED BY: Richard Hewens
Posted 4 years ago

Hi Richard,

I got no reponse at all for 1.19, as well. The code took a looong time in the notebook. You are not mistaken.

POSTED BY: Updating Name
Posted 4 years ago

1.15 My code produces the correct (expected) output and uses the suggested functions, but doesn't check. I've tried it with both Integer and String outputs. ???

POSTED BY: Updating Name

Please feel free to email wolfram-u@wolfram.com with your solutions.

I have sent the file with all exercises solved!

Dear Abrita,

I have you send my exercise notebook by e-mail for verification. Please enjoy my old fashioned programming style and have fun.

POSTED BY: Jürgen Kanz
Posted 4 years ago

Do I need to send the notebook? There is no submit button. When I press check my solution, does it also send the solution for recording?

POSTED BY: Muhammad Ali

Your answer is recorded whenever you hit "Check my solution" and we collect all the submissions marked as accepted by the auto-grader.

We are working on the auto-grader to accept alternate solutions for some of the problems we had missed before.

Dear Abrita I have sent the file of exercise with the solutions by e-mail Thank you very much

For 1.8, I used RandomPoint for the center of the sphere rather than a triplet of random real numbers. My code produces the expected output but is not accepted. What is your definition of the unit cube?

By unit cube we are recommending that the centers of the spheres be points within 0 and 1 in all three axes. Yes - there is an issue with 1.8 accepting alternate solution. We are working on it. Please feel free to email your valid solution to wolfram-u@wolfram.com

Posted 4 years ago

Nr. 1.18 was wrong. It has been corrected.

POSTED BY: Paul Erickson

Hints for solutions: Again these are hinting at one way to solve these problems. If you have a different solution producing the same expected output, please email us (wolfram-u@wolfram.com) your entire exercise notebook with solutions.

  • Problem 1.4: RandomChoice will give you a random letter. Other WL functions to consider are Riffle to mix up consonants and vowels, StringJoin to join them, and Table to do the whole process 5 times
  • Problem 1.5: There might have been an issue initially but it was fixed right away. The correct solution should be accepted now.
  • Problem 1.7: A Panel with its Background set should be mapped over the letters (in upper case) of Russian Alphabet
  • Problem 1.8: Sphere[p,r] represents a sphere of radius r centered at the point p. We know r is to be 0.05 and p can be created out of a triplet of RandomReal numbers {x,y,z} less than 1 (because they have to be inside the unit cube). Use Table to create a 100 of these.
  • Problem 1.11: Yes this is from the documentation - Neat Examples.
  • Problem 1.13: WordList[] should provide the list of words. StringTake can be used on a list of strings - so it can be used on WordList[]. Counts and TakeLargest should do the rest.
  • Problem 1.18: The confusion might have been due to the wrong screenshot for the expected output. This has been updated. enter image description here

Nr 1.7 is not more wrong! It has been corrected!

Nr. 1.18 is not more wrong! It has been corrected!

Posted 4 years ago

Is Nr. 1.6 correct? Only 10 times??

POSTED BY: Zhengkun Liu
Posted 4 years ago

Hi Abrita,

thank you for your clarifications. With the expected output I was able to solve 1.18. For 1.4 and 1.13 my solutions are still not accepted. I will send you my notebook by mail.

POSTED BY: Bernd Barsuhn

For 1.18, is the expected output an association listing the US State capitals with their distances to Washington DC sorted in decreasing distance to Washington DC order, or just a list of capitals sorted in that order?

Hello All,

Thanks for commenting on the issues. We're working on them.

  • Problem 1.11: GenomeData does seem to be running into some issues on the cloud. However the the auto-grader should accept the solution even if the cell throws error on evaluation.

  • Problem 1.18: The expected out is as follows (this was fixed on the cloud but in some cases the update is not showing up when you are working on your local copy) enter image description here

I'll add a few more hints for the problems that seem to be having issues with accepting solutions. As many of you have pointed out TMTOWTDI :) (there's more than one way to do it - more so in the Wolfram Language). We're continuing to work on the autograder to ensure all viable solutions are accepted. If you continue to face issues, feel free to download the exercise notebook, complete your solutions and send to wolfram-u@wolfram.com.

Thanks for your patience.

Hi Abrita,

how can we download the exercises notebook. On my end, it is displayed as a web-page with no options to download.

Thanks,

Slava

Posted 4 years ago

Hi Sviatoslav,

I was puzzled by this too. I don't know if this will be the same for all of us, but I found out that there was a copy of the exercise notebook stored im my wolfram cloud files.

Log into your account at https://www.wolframcloud.com. Go to "My Files". Open the subfolder "Copied files" in your Home folder. There you might find a notebook file called "01_exercises.nb". In my case, this was the notebook containing the exercises.

POSTED BY: Bernd Barsuhn

Vielen Dank, Bernd!

I have already come up with 4 different ways to write this code for 1.11 and none of them are accepted. enter image description here

POSTED BY: Yuliia Maidannyk

Well done, from my point of view. My code is less elegant but provides the same output. The funny thing in my case is that my code runs very well on Mathematica V12.1, but it produces hard errors on the test page.

POSTED BY: Jürgen Kanz

Same, there is some error with GenomeData[] on the webpage but on my end everything works fine as can be seen in the screenshot

POSTED BY: Yuliia Maidannyk
Posted 4 years ago

I'm also seeing an error on the webpage with the Genome data, although it works fine in Mathematica 12.1 desktop. The exercise 1.11 is taken directly from the GenomeData help page (in the "Neat Examples" section). Oddly, the example code generates an error on the exercises web page, but is accepted as a "correct" response.

POSTED BY: Richard Hewens

Hi, I have to admit that my fun in doing the test is decreasing very fast. Today I do not have solutions for all tasks (approx. 4 are still open). For the rest, I can generate the EXPECTED OUTPUT, but even then in most cases, the solutions are not accepted.

For some tasks, I can not generate the requested solution. An example related to 1.13:

WordList[]

It gives me a list of German words, because I am located in Germany.

WordList[Language->"English"]

Gives me a list of English words with a length of 39176

WordList["KnownWords", Language -> "English"]

Gives me a list of English words with a length of 84923

So, I am producing the correct sequence of letters, but I assume that the values are not accepted because not all students can use the same prerequisites.

I could add more examples, where I am facing issues. Perhaps your checking algorithm does not only look for the correct outcome, but he is also looking for Functions in a certain order that should be applied. If this is the case, please consider "there are many roads to Rome".

Therefore, I am going to finish all tasks, because it is a challenge for me, but that is it. I do not get the impression that your test environment is mature enough.

POSTED BY: Jürgen Kanz
Posted 4 years ago

Hello Juergen,

I am also from Germany. Did you know, that you can work around the issues publishing Mathematica code or notebooks to an international community by setting the language to English in the interface tab of the Mathematica preferences dialog? This is easy to toggle without changing any language settings of the OS. You'll just have to restart the MMA frontend. After publishing, you can easily switch back to your preferred language, if you want to.

It seems that the verification of the exercise solutions has some issues. Not every valid solution is accepted. As of 1.13, I also was not able to find an accepted solution. I would suspect, that there might be no solution that would be accepted at all.

Question to all: Did anyone find an accepted solution to 1.4, 1.13 or 1.18? I finally gave up on those leaving my not accepted solutions in place.

For those still struggling with 1.8 you might want to check my hints on an accepted solution for 1.8 from my post from yesterday. I am just giving hints on what the verification wants to see, not on the task in solving the exercise.

If anyone did find a solution to 1.4, 1.13 or 1.18, I would appreciate some hints from the community. You should not post a solution, but some insight on what the verification wants to see would be helpful. I don't think this will be considered as cheating. @Wolfram: Could you confirm this or add some clarification on those exercises.

POSTED BY: Bernd Barsuhn

Hello Bernd,

Thank you very much for your hint. I have changed the language to English and WordList[] comes now with the list of English words. The list is the same as you can get with WordList[Language -> "English"]. The difference in the counting result remains the same.

Expected output: enter image description here

My output: enter image description here

POSTED BY: Jürgen Kanz

In reply to Juergen on 1.13: I had this issue as well generating your number, but if you consider the number of characters as case sensitive - i.e. "A" and "a" separately... Somewhat ambiguous question, so figure this hint is fair game...

POSTED BY: Paul Erickson

Thank you Paul!

Yes, there was a ToLowerCase in my code, to collect the first letters from all words.

POSTED BY: Jürgen Kanz

[WSG20] Programming Fundamentals Week 4

POSTED BY: Jürgen Kanz
Posted 4 years ago

I accidentally typed * in the solution cell and it is converted to item cell and now I can't work on it. Can someone please tell me how to reset the test?

POSTED BY: Muhammad Ali

Hi Muhammad, Click inside the cell and hit the shortcut keys to change to "Input" style Cmd 9 on a Mac or Alt 9 on Windows. Let us know if that does not work.

Posted 4 years ago

Thank you, converting to input cell makes the checking button appear again and it is working now.

I have one more question, it was mentioned that you are adding more acceptable solutions to the autograder. Does the autograder checklist exist within the notebook itself or does it send answers to another location for verification? So would I automatically get these additional acceptable solutions without changing anything or do I need to update the notebook or perhaps delete or download it again somehow?

POSTED BY: Muhammad Ali
Posted 4 years ago

Hey, why was my above reply appearing as if it is from Vitaliy Kaurov? I am Muhammad Ali. What is going on here???

POSTED BY: Muhammad Ali

Do all 20 exercises have to be completed correctly in order to achieve a certificate?

I have a few exercises for which my code produces correct outputs but the answer isn't accepted. For example this one: enter image description here

POSTED BY: Yuliia Maidannyk
Posted 4 years ago

Since this is indeed a test I wouldn't recommend posting your solution. If your query requires an explicit mention of your solution then I would recommend contacting: wolfram-u@wolfram.com

POSTED BY: Muhammad Ali

@Yuliia Maidannyk, to achieve the Level I certification, you must successfully answer 70% of the exercise set.

POSTED BY: Jamie Peterson
Posted 4 years ago

Thanks for this information!

POSTED BY: Zhengkun Liu
Posted 4 years ago

Cite "you must successfully answer 70% of the exercise set."

If 100% of the exercise set has been fully correct answered, is the certificate of completion with Honors possible?

POSTED BY: Zhengkun Liu

@Zhengkun Liu, thanks for this suggestion. We currently do not denote "with honors" for Wolfram certifications.

POSTED BY: Jamie Peterson
Posted 4 years ago

Can this Mathematica certificate be verified online?

POSTED BY: Zhengkun Liu

@Zhengkun Liu, online verification of an individual's certification status is not available at this time, but that would be a useful thing for employers and others to securely look up. Thank you for the suggestion. Also, individuals can request a verification notice by contacting wolfram-u@wolfram.com.

POSTED BY: Jamie Peterson

In Problem 1.15, the expected output is incorrect:

enter image description here

The correct output should be 654421

Sorry, misunderstood the problem 1.15.

I experienced the same issue. I have solutions that generate the expected output for 1.8, 1.13, 1.14 but are not accepted. Can we e-mail our solutions to someone to have them checked manually?

Hi, Abrita,

It seems that the set of exercises has some inconveniences in numbers: 1.4, 1.7, 1.8, 1.13, 1.18

Additionally I have to ask if the Certificate of Completion was sent to participants. I have not received anything!

Posted 4 years ago

Same, I also have issues with 1.4, 1.8, 1.13, 1.18. Moreover, if I try to introduce unnecessary variables to store intermediate results or start scoping these variables by using Block, With or Module without changing the output, the previously correct result starts getting recognized as incorrect.

POSTED BY: Muhammad Ali

Also having trouble with 1.11 as exact output match, and tried length and alpha sort on 'standardnames' etc, but even though elements and order match, no check mark. I think the exact criteria for acceptance must be a bit more obscure than it should be...

1.12 was a bit picky - didn't like FontStyle ... but eventually trying various variants...

Agreed 1.4, 1.8, 1.13, 1.18 seem to be having problems, but not quite done with the others yet.

POSTED BY: Paul Erickson

Hi Muhammad, We tried to keep the solutions as simple one-liners.You will not have to use Module or Block.

Posted 4 years ago

I had to try a lot of correct solutions, before I was able to find an accepted solution for 1.8.

One issue with 1.8 is the definition of "the unit cube". As of my knowledge a unit cube is simply a cube with unit edge length. This definition does not specify a position of "the unit cube". Wolfram Language does have a geometric region function named Cube, where "Cube[]" is defined to be a unit cube centered at the origin. But this seems not to be accepted in 1.8, which seems to assume, that "the unit cube" is centered at {0.5,0.5,0.5}.

Secondly the obvious solution for the Graphics3D primitive list would be the color primitive followed by a sequence of spheres. As the Sphere function does allow to represent a collection of spheres, by specifying a list of center points as its first argument, the simplest solution would be a single color followed by a single Sphere call with a list of 100 center points. Again, both of this seems not to be, what would be accepted as a solution in 1.8. A far less optimal solution finally worked for me. Specifying a list of pairs as primitives in Graphics3D, where each pair contains a single color and a single sphere.

I still did not find any accepted solution for 1.4, 1.13 and 1.18. Additionally the expected output shown in 1.18 does not seem to be correct. At least for my interpretation of the question. Last in the list of the expected outcome is Cheyenne (Wyoming), which should then be the closest capital to Washington DC. I am not living in the states, but as of my knowledge this is obviously not correct.

POSTED BY: Bernd Barsuhn
Posted 4 years ago

1.18 is clearly wrong I even plotted it on the map with concentric disks of distances centered at Washington DC to visually confirm.

POSTED BY: Muhammad Ali

Hi Bernd, Thank you for your comments on 1.8. We are working on the auto-grader to accept the alternate solutions. The solutions you suggest are perfectly acceptable.

Posted 4 years ago

Hi Bernd,

Specifying a list of pairs as primitives in Graphics3D, where each pair contains a single color and a single sphere

I tried this and several other alternatives, none were accepted including Abrita's hint below (Note: the .5 should be 0.5).

Problem 1.8: Sphere[p,r] represents a sphere of radius r centered at the point p. We know r is to be .5 and p can be created out of a triplet of RandomReal numbers less than 1 (because they have to be inside the unit cube). Use Table to create a 100 of these.

POSTED BY: Updating Name
Posted 4 years ago

The correct radius is 0.05.

What gets into Graphics3D should look like

{{Orange, Sphere[{x1,y1,z1}, 0.05]}, ... {Orange, Sphere[{xn, yn, zn}, 0.05]}}

where all xi, yi, zi are in the interval [0, 1]. You might remove the call to Graphics3D from your code to check it.

Correct depth of the list is also important. {{{Orange, Sphere[{x1,y1,z1},0.05]},...}} will also not be accepted.

POSTED BY: Bernd Barsuhn
Posted 4 years ago

we can use table or array to do it or?

POSTED BY: Zhengkun Liu
Posted 4 years ago

we can use table or array to do it or?

POSTED BY: Zhengkun Liu
Posted 4 years ago

My solution for 1.5 is not accepted even though it generates the expected output.

POSTED BY: Rohit Namjoshi

this should work ok now.

Hi Valeriu, The certificates of completions have been going out this week. Please email us if you haven't received yours.

Thank you, Abrita! I have received it yesterday!

Posted 4 years ago

for Nr. 1.6, is 10 times correct?

POSTED BY: Zhengkun Liu

The EXPECTED OUTPUT is given in the exercise notebook. It is not a number or factor that you have to deliver. A NestGraph code is needed which produces the following image:

enter image description here

Good Luck!

POSTED BY: Jürgen Kanz
Posted 4 years ago

Thanks Abrita. Will have look.

POSTED BY: Derek Jones
Posted 4 years ago

Hello everyone. I am a novice to physics, but I am quite interested in the potentially new way of interpreting physics, offering my contribution where I can and wondering if this is the right place to start. Could someone please help?

POSTED BY: Derek Jones

Hi Derek, This will be a good place for you to start https://www.wolframphysics.org/

Since I haven't been receiving the reminder email (at all), could you post it here as well? or at least post that they have been sent...

POSTED BY: Paul Erickson

Paul, I'd like to troubleshoot your email issue with you directly. I will send an email to you shortly.

POSTED BY: Jamie Peterson

Thanks for sharing Abrita! Enjoyed it.

Is there a single location for all the coding challenges required for completion of the Level 1 cert? \

POSTED BY: Joseph Sauvageau

Yes, there will be one link to a cloud notebook with the exercises required for the Level I certification. The link will be shared with all participants in a Study Group email scheduled for Wednesday, June 3. You'll have 2 weeks to complete the exercises. Quizzes should be completed by Friday, June 5.

POSTED BY: Jamie Peterson
Posted 4 years ago

Thank you for the update on the exercises and the timeline with regard to completion of those exercises. I enjoyed the WSG.

POSTED BY: David Schulz

What shall I do if I didn't receive the link for the exercises yesterday?

POSTED BY: Yuliia Maidannyk
Posted 4 years ago

On Wednesday, I did not get a link to the exercises.

POSTED BY: David Schulz

Hi All, Sorry for the delay in sending out the link. Please rest assured you will have at least 2 weeks from the date of release of the exercises, to submit the solutions.

Posted 4 years ago

@Abrita Chakravarty Are multiple attempts allowed in auto-graded exercises?

POSTED BY: Muhammad Ali

Absolutely!

Posted 4 years ago

@Abrita Chakravarty Also the auto-grader is not expecting the code to be written in a certain way rather as long as it produces the correct output, anything goes, right?

POSTED BY: Muhammad Ali

Right you are! As long as your code is producing the expected output - it should be accepted by the autograder. If you do run into any issues, please report to wolfram-u@wolfram.com

Posted 4 years ago

Thank you

POSTED BY: Muhammad Ali
Posted 4 years ago

For clarification, on May 18, during the recorded Study Group, I asked a question about earning the Level I certification in Wolfram Technology. Here is my question and the answer I received: ******************* Q: For Program completion and Wolfram Technology Certified Level I, is there a difference between quiz questions and assigned questions?

A: Only quizzes are going towards your certification. Challenges in community, poll questions and other in session items are strictly review. **************** So, my understanding was that satisfactory completion of the quizzes was the only requirement for earning the Wolfram Technology Certified Level 1. Please confirm that my satisfactory completion of the quizzes has been applied to my Wolfram Technology Level 1 certification.

Thank you!

POSTED BY: David Schulz

Hi @David Schulz, I am sorry for the miscommunication. There are two different levels of certification associated with this study group. The first is a certificate of program completion, and that requires the four quizzes. The other is Level I certification in programming fundamentals, and that requires the exercise set. The previous (April) study group did not offer Level I certification, so that has caused a little confusion.

POSTED BY: Jamie Peterson
Posted 4 years ago

Thank you for the clarification. I have not yet received an email with information about the exercises. It looks like people are maybe already working on the problems, and I would like to have plenty of time to complete the work. Thanks again.

POSTED BY: David Schulz

@David Schulz, those emails are being sent this morning. Yours should have arrived by now. Let me know, please.

POSTED BY: Jamie Peterson
Posted 4 years ago

I received the email with the link. Thank you!

POSTED BY: David Schulz
Posted 4 years ago

I still did not get a link to the exercises

POSTED BY: Bernd Barsuhn

Hi @Bernd Barsuhn, those emails are being sent this morning. Yours should have arrived by now. Let me know, please.

POSTED BY: Jamie Peterson
Posted 4 years ago

Got it. Thanks a lot!

POSTED BY: Bernd Barsuhn
Posted 4 years ago

Hi Abrita,

What are the requirements for Level II certification in programming fundamentals?

Warm regards, Zhengkun

POSTED BY: Zhengkun Liu

We do not have a Level II certification available for the study group sessions currently.

Posted 4 years ago

Hi Jamie, I didn't receive the email regarding the exercises on Wednesday, could you send the link to me as well?

POSTED BY: Marko Rossi

Hi Marko, Hope you received the email by now.

holy crap i didn't know there were exercises, i got distracted studying quantum mechanics! what's the deadline? how much time do i still have? daaaamn

I am puzzled by the following:

enter image description here

Why are the two blanks interpreted as the same?

Posted 4 years ago

Because it is the same symbol. Such as a + a. Blank[] is also just a symbol. It has no special meaning in evaluation rules.

This was discussed in Week 3 Part 3 "Evaluation Control". To use an expression with blanks in pattern matching, you should use HoldPattern. See slide 24 of the "Evaluation Control" presentation notebook.

POSTED BY: Bernd Barsuhn

Thank you. It takes some getting used to. Does

enter image description here

work as expected because there is no way to evaluate Blank[]^Blank[] even if the blanks are the same? Here is another curious example; enter image description here

Why does this not pick up e-2f?

The response follows from this:

In[1]:= Cases[{a - b, c + d, e - 2 f}, HoldPattern[_ + Times[x_ /; x < 0, _]]]
Out[1]= {a - b, e - 2 f}

There is no Minus[] function as an arithmetic operation. Minus[x] is only the arithmetic negation of x.

Thanks, Valeriu.

I've not received the reminder emails. I don't have the links to the fourth quiz. Nor to the (higher level) course (level 1 programmer proficiency)? Not sure if I'll be doing that, but would like to investigate. Paul

POSTED BY: Paul Erickson

Hi Paul, here is the link to Quiz 4:

Quiz 4

Yup link to the exercises will go out on Tuesday. Thanks.

Posted 4 years ago

Thanks.

POSTED BY: rjehanathan

Will there be a link to the notebooks that were used in the presentations?

POSTED BY: Charles Glover
Posted 4 years ago

Abrita, I haven't received the link to the exercises that were mentioned in the webinar earlier today.If that's because you haven't sent it out yet that's fine. Regards, Rajeev

POSTED BY: rjehanathan
f[t_, n_] := -t^n {Cos@t Sin@t^2, Sin@t Cos@t^2};
ParametricPlot[
 Evaluate[f[t, #] & /@ Range[0, 1, 0.1]], {t, 24 \[Pi], 48 \[Pi]}, 
 Axes -> False, PlotStyle -> Thick]

enter image description here

Posted 4 years ago

My favorites: Manipulate and all kinds of Entity functions!

Now that many art galleries are closed around the world, here is a small app that shows random paintings from the Wolfram entities by different centuries.

In case the Manipulate is not working on this site, here is a screenshot: enter image description here

I started by writing an oneliner showing a list of random paintings, then used Select function to filter paintings by year and wrapped Manipulate around the whole thing. Lastly, I added some error handling in case of missing data or if filtering returned an empty list.

POSTED BY: Marko Rossi
Posted 4 years ago

POSTED BY: Bernd Barsuhn
Posted 4 years ago

The published notebook does not seem to render correctly in all browsers, when being viewed on this community page. You might try it using the "Make Your Own Copy" button. This always worked for me.

POSTED BY: Bernd Barsuhn

Hello all!

My favorite Wolfram Language function is Manipulate because it is simply one of the best ways to show young people how patterns develop and change.

This code is inspired by John. H. Conway (1937-2020), Richard K. Guy (1916-2020) in their Book of Numbers (Springer-Verlag 1996, page 31, Figure 2.10).

ENJOY!

Manipulate[Multicolumn[show[n], columns, Appearance -> "Horizontal"],

 {{columns, 10}, 5, 25, 1}, {{n, 25, "Numbers to display:"}, 5, 1000, 
  1}, {show, {redDots -> "Dots", redSquares -> "Numbers"}},

 LabelStyle -> {14, FontFamily -> "Times"},
 FrameLabel -> {"", "", 
   Column[{Style["What Shapes Do The Red Figures Make?", Bold, 18],
     Style["(a.k.a. Residue Classes for Kids)", Gray]}, 
    Alignment -> Center], ""},

 Initialization :> {
   tinyCircRed = 
    Graphics[{Darker@Red, Disk[{0, 0}, .01]}, ImageSize -> 5],
   tinyCircGray = 
    Graphics[{Lighter@RGBColor[.9, .9, .9], Disk[{0, 0}, .01]}, 
     ImageSize -> 5],

   redSquares[max_] := Table[
     If[IntegerQ[Sqrt[x]] == True, 
      Style[x, Darker@Red, 16, Bold, FontFamily -> "Times"], 
      Style[x, Lighter@Gray]], {x, 1, max, 1}],

   redDots[max_] := Table[
     If[IntegerQ[Sqrt[x]] == True, tinyCircRed, tinyCircGray], {x, 0, 
      max, 1}]}]

enter image description here

POSTED BY: Lori Johnson
Posted 4 years ago

POSTED BY: Bernd Barsuhn

CHALLENGE: Find a dataset of the 5 largest observed altitudes in the Fireballs & Bolides dataset.

ballBols = ResourceData["Fireballs and Bolides"];
ballBols[TakeLargestBy["Altitude", 5]][All, "Altitude"]

enter image description here

A little context and styling:

Dataset[Take[ReverseSort@ballBols[All, {"Altitude", "NearestCity"}], 
  5], HeaderBackground -> Lighter@Red, 
 HeaderDisplayFunction -> (Style[#, Bold, 18] &)]
(*nicer with headers to show context*)

enter image description here

BONUS: Plot the nearest cities for the 10 entries with largest altitudes in the Fireballs & Bolides dataset, labeling each city.

nearCity = ballBols[TakeLargestBy["Altitude", 10]][All, "NearestCity"]

enter image description here

Plot with easy with read lables:

GeoListPlot[nearCity, GeoLabels -> Automatic, 
 PlotMarkers -> GeoMarker, GeoBackground -> "ReliefMap", 
 LabelStyle -> {Darker@Red, 14, Background -> LightYellow}]
(*large, easy to read labels*)

enter image description here

POSTED BY: Lori Johnson

End-of-study-group open challenge: To all the enthusiastic study group participants ... post a snippet of code using your favorite Wolfram Language function--may be something you learned in one of the study group sessions.

Feel free to "Like" posts by fellow study group participants and we will declare the most liked post, at our last session, on Friday.

Thanks, Abrita,

This has been a BLAST!!! :-)

POSTED BY: Lori Johnson
Posted 4 years ago

Hi Abrita,

During the Tuesday webinar someone asked if there is a way to tell if Dataset operators are ascending or descending. There are undocumented functions AscendingQ and DescendingQ in the Dataset package that do this. See this post for details.

Dataset`AscendingQ /@ {Total, Select, All, Key["a"]}
(* {True, True, False, False} *)
POSTED BY: Rohit Namjoshi

Excellent. Thanks for sharing!

Posted 4 years ago

Thank you I asked this during the session.

POSTED BY: Muhammad Ali

May 26-27 Challenge: From EIWL ...

Find a dataset of the 5 largest observed altitudes in the Fireballs & Bolides dataset.

Extra credit:

Plot the nearest cities for the 10 entries with largest altitudes in the Fireballs & Bolides dataset, labeling each city.

Posted 4 years ago
ResourceData["Fireballs and Bolides"][TakeLargestBy[#Altitude &, 5]]

ResourceData["Fireballs and Bolides"][
  TakeLargestBy[#Altitude &, 10],
  "Coordinates",
  GeoNearest[Entity["City"], #] &][
 GeoListPlot[#, GeoLabels -> True, PlotLegends -> None] &]

enter image description here

POSTED BY: Rohit Namjoshi
Posted 4 years ago

Part 1: ResourceData[ResourceObject["Fireballs and Bolides"], "Dataset"][ Select[QuantityQ[#Altitude] &] /* TakeLargestBy[QuantityMagnitude[#Altitude] &, 5]]

Extra Credit: GeoListPlot[ Normal@ResourceData[ResourceObject["Fireballs and Bolides"], "Dataset"][ Select[QuantityQ[#Altitude] &] /* TakeLargestBy[QuantityMagnitude[#Altitude] &, 10], "NearestCity"], GeoLabels -> True]

POSTED BY: rjehanathan

Did you mean Friday May 29 ?

Sorry. That was a typo.

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