• After more than 15 years covering everything Apple, it’s with a heavy heart we announce that we will no longer be publishing new content on iMore and the iMore forums will be closing as of November 1st, 2024.

iMore

Hello, I have a question about Playgrounds Answers. I need to set up a Plagrounds Answers Scrpit what calculates the average of different school subjects with a coefficient using a dictionnary where you can change the subjects and the coefficients like [„French“ : 3 , „German“ : 2] etc. The average needs to be rounded up. The goal is to use it in Playgrounds Answers so the script asks you the Marks of the different Subjects by askForNumer() and calculates the average with the coefficients, rounds it up and shows you the result.

Thanks for any help :)

James