Group Abstract Group Abstract

Message Boards Message Boards

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

[WSG20] Programming Fundamentals Week 4

163 Replies

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

POSTED BY: Vitaliy Reznikov
Posted 5 years ago
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.

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

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
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 5 years ago
POSTED BY: Rohit Namjoshi

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 5 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

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

Posted 5 years ago

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

POSTED BY: Zhengkun Liu
Posted 5 years ago

Dear Wolfram TEAM,

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

POSTED BY: Zhengkun Liu
Posted 5 years ago
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 5 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 5 years ago
POSTED BY: Rohit Namjoshi
Posted 5 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
Posted 5 years ago
POSTED BY: Richard Hewens
Posted 5 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 5 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 5 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 5 years ago

Nr. 1.18 was wrong. It has been corrected.

POSTED BY: Paul Erickson

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

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

Posted 5 years ago

Is Nr. 1.6 correct? Only 10 times??

POSTED BY: Zhengkun Liu
Posted 5 years ago
POSTED BY: Bernd Barsuhn

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 5 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!

POSTED BY: Yuliia Maidannyk
POSTED BY: Jürgen Kanz
POSTED BY: Yuliia Maidannyk
Posted 5 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
POSTED BY: Jürgen Kanz
Posted 5 years ago
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
POSTED BY: Jürgen Kanz

[WSG20] Programming Fundamentals Week 4

POSTED BY: Jürgen Kanz
Posted 5 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 5 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 5 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
POSTED BY: Yuliia Maidannyk
Posted 5 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 5 years ago

Thanks for this information!

POSTED BY: Zhengkun Liu
Posted 5 years ago
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 5 years ago

Can this Mathematica certificate be verified online?

POSTED BY: Zhengkun Liu
POSTED BY: Jamie Peterson

In Problem 1.15, the expected output is incorrect:

enter image description here

The correct output should be 654421

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 5 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 5 years ago
POSTED BY: Bernd Barsuhn
Posted 5 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
Posted 5 years ago
POSTED BY: Updating Name
Posted 5 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 5 years ago

we can use table or array to do it or?

POSTED BY: Zhengkun Liu
Posted 5 years ago
POSTED BY: Zhengkun Liu
Posted 5 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 5 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 5 years ago

Thanks Abrita. Will have look.

POSTED BY: Derek Jones
Posted 5 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/

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 5 years ago
POSTED BY: David Schulz

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

POSTED BY: Yuliia Maidannyk
Posted 5 years ago
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 5 years ago

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

POSTED BY: Muhammad Ali

Absolutely!

Posted 5 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 5 years ago

Thank you

POSTED BY: Muhammad Ali
Posted 5 years ago
POSTED BY: David Schulz
POSTED BY: Jamie Peterson
Posted 5 years ago
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 5 years ago

I received the email with the link. Thank you!

POSTED BY: David Schulz
Posted 5 years ago

I still did not get a link to the exercises

POSTED BY: Bernd Barsuhn
POSTED BY: Jamie Peterson
Posted 5 years ago

Got it. Thanks a lot!

POSTED BY: Bernd Barsuhn
Posted 5 years ago

Hi Abrita,

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

Warm regards, Zhengkun

POSTED BY: Zhengkun Liu
Posted 5 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.

Posted 6 years ago
POSTED BY: Bernd Barsuhn

Thanks, Valeriu.

POSTED BY: Paul Erickson
Posted 6 years ago

Thanks.

POSTED BY: rjehanathan
POSTED BY: Charles Glover
Posted 6 years ago
POSTED BY: rjehanathan
Posted 6 years ago
POSTED BY: Marko Rossi
Posted 6 years ago

POSTED BY: Bernd Barsuhn
Posted 6 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 6 years ago

POSTED BY: Bernd Barsuhn
POSTED BY: Lori Johnson
POSTED BY: Lori Johnson
Posted 6 years ago
POSTED BY: Rohit Namjoshi
Posted 5 years ago

Thank you I asked this during the session.

POSTED BY: Muhammad Ali
Posted 6 years ago
POSTED BY: Rohit Namjoshi
Posted 6 years ago
POSTED BY: rjehanathan

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