0

I Need help with this algorithm

Hey, can anyone recommend a reliable algorithm that takes in high school subjects as input and suggests possible programs one might persue in university or explain how to develop such an algorithm ?

1st Sep 2018, 5:20 AM
Nyasha Chizampeni
Nyasha Chizampeni - avatar
1 Odpowiedź
0
I guess you can start with this and develop as necessary, it's in JavaScript, so you can test it by pasting it in JS tab of a blank web code; // A list of paired subject & possible matching // or related course of studies var matches = { "math":["Option 1 for Math", "Option 2 for Math"], "biology":["Option 1 for Bio", "Option 2 for Bio"], "art":["Option 1 for Art", "Option 2 for Art"] }; var subject = prompt("Enter your subject:"); var possible = matches[subject.toLowerCase()]; if(possible !== undefined) { console.log(possible); } else { console.log("Sorry, no match was found for " + subject); } Hth, cmiiw
1st Sep 2018, 3:30 PM
Ipang