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

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

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
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"}}]
POSTED BY: Vitaliy Reznikov
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

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 *)
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.

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

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

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

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

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

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

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 5 years ago
POSTED BY: Bernd Barsuhn
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
POSTED BY: Jürgen Kanz
Posted 5 years ago
POSTED BY: Muhammad Ali
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

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

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

we can use table or array to do it or?

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

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

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

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

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

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
POSTED BY: Paul Erickson
Posted 6 years ago

Thanks.

POSTED BY: rjehanathan
POSTED BY: Charles Glover
Posted 6 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
Posted 6 years ago
POSTED BY: Marko Rossi
Posted 6 years ago

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

Thanks, Abrita,

This has been a BLAST!!! :-)

POSTED BY: Lori Johnson
Posted 6 years ago
POSTED BY: Rohit Namjoshi

Excellent. Thanks for sharing!

Posted 5 years ago

Thank you I asked this during the session.

POSTED BY: Muhammad Ali
Posted 6 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 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