Help me fix some problem for my Sorting (name and score)

debug show no error, but not showing the page or notifier

here is the do it:

it works well finally haha :rofl:

So 100 posts, and you learned Do It

Hey, I've encountered an issue. I need to modify the statement to 'not equal to 0' because otherwise, 'showSucestop5' gets called at the start of game when the initial score matches zero. However, changing it to 'not equal to 0' prevents 'showSucestop5' from being called when the user genuinely achieves a final score of 0.

Is there a way to make it so that 'showSucestop5' can still be called if the user's final score is 0, while also avoiding its call at the beginning of the game?" :slightly_smiling_face:


image

Add an extra condition restricting the high score test to if the score > 0
2cc44df46cf6d71895aa9596a9e1953195271cda_2_690x352

Displaying the scores should be done regardless


image
problem: if user got 0 for final score, the "you lose" message is not pop up



is this ok? it works well

one question, by using this sorting algorithm, is this consider bubble or insertion sort? i bit worry that my lecturer will not accept this since it is calling the built-in AI2 list sort blocks

All you can say is that it's a native builtin sort package.
MIT didn't say in its docs.

1 Like

is that possible for me to edit what have have now by adding this "insertion sort"?(sorry for asking this, bcz I remember my lecturer did said must use sorting algorithm(can be either bubble, insert,selection). It seems like they want to know whether I can apply the sorting algorithm knowledge to this app

If you want to include your own insertion sort, you will need to learn

  • value procedures
  • procedure parameters
  • list operations
  • the insertion sort algorithm.
1 Like



See top5 for the required comparison test.

image




I made changes like this, then i got right result , but only show up one score(and keep replace the score with higher score and name):

(do u think I can keep these changes? or I should follow the one u sent me)

Maybe there is no room to show the bottom of the ListViews?

sorry, can explain the insertion sort u created(no sure how it works, and I believe there is some error for this:

You failed to customize the precedes function to work on (score,name) pairs.

image

1 Like

Thank you so much for all your help these past few days, you've been incredibly helpful! :smiling_face_with_three_hearts: :pray: