mardi 15 octobre 2019

Storing a string in a variable - value should change depending on other values

I have created a program - where a user takes a test and inputs times they have taken on a ski slope. Based upon the score of the test (which is stored in a variable AND the average time it took on ski slopes (also stored in a variable) I want to assign the player to be either a Beginner, Intermediate or Advanced.

I am assuming this should be a foreach loop as it will be for each player - the if statement should be something like: if (time <=100 && score >=6) {Level == "Advanced" } else if (time <=500 && score >=4) {Level == "Intermediate" } else if (time <=800 && score >=2) {Level == "Beginner" }'

Aucun commentaire:

Enregistrer un commentaire