I'm trying to figure out what the best languages are in three categories. They are…
- User
I'm trying to figure out what the best languages are in three categories. They are speed, readability, and easiness of code. I've already done speed using three benchmarks and C was first, followed by JavaScript and then GO. The languages in the tests are C, JavaScript, GO, C++, Python, Java, and C#. However I lost the code I used in the speed categories, so I'm trying to figure out another program I can make in all those languages.
My idea is a program that takes a name and then makes a bunch of adjectives from all the letters in the name. The JavaScript code is /Change the name here/ const name = "Amy"; function randomElement(array) { return array[Math.floor(Math.random()*array.length)]; } function letterToAdjective(l) { const lowercase = l.toLowerCase(); let possibleAdjectives = []; switch (lowercase) { case "a": possibleAdjectives = ["Ambitious", "Adventurous", "Artistic", "Authorative", "Achieving"]; break; case "b": possibleAdjectives = ["Brilliant", "Bad", "Buff", "Beastly", "Banterful", "Boasting"]; break; case "c": possibleAdjectives = ["Chatty", "Courageous", "Catastrophic"]; break; case "d": possibleAdjectives = ["Dastardly", "Dreadful", "Dark", "Deadly", "Dreamy", "Dull"]; break; case "e": possibleAdjectives = ["Eager", "Extreme", "Expecting", "Exceeding", "Energising"]; break; case "f": possibleAdjectives = ["Fun", "Frightful", "Fearful", "Fat", "Fast"]; break; case "g": possibleAdjectives = ["Great", "Good", "Gloating"]; break; case "h": possibleAdjectives = ["Horrid", "Heckling", "Hopeful", "Handy"]; break; case "i": possibleAdjectives = ["Insightful", "Intelligent"]; break; case "j": possibleAdjectives = ["Jokey"]; break; case "k": possibleAdjectives = ["Killing"]; break; case "l": possibleAdjectives = ["Loud", "Lustful", "Loony", "Lovable"]; break; case "m": possibleAdjectives = ["Murderous", "Masterful", "Moody", "Mischevious", "Misbehaving"]; break; case "n": possibleAdjectives = ["Nosy", "Noisy", "Needy", "Nostalgic"]; break; case "o": possibleAdjectives = ["Open", "Old", "Overcompensating"]; break; case "p": possibleAdjectives = ["Pleasing", "Powerful", "Ponderful", "People-pleasing"]; break; case "q": possibleAdjectives = ["Questioning", "Quirky", "Quiet"]; break; case "r": possibleAdjectives = ["Rowdy", "Rad", "Rude", "Rich"]; break; case "s": possibleAdjectives = ["Super", "Sad", "Short", "Sloth", "Sly", "Smart"]; break; case "t": possibleAdjectives = ["Turtly"]; break; case "u": possibleAdjectives = ["Understanding", "Useless", "Useful", "Unreal"]; break; case "v": possibleAdjectives = ["Vicious"]; break; case "w": possibleAdjectives = ["Weird", "Wistful", "Wonderful", "Wondering", "Wild"]; break; case "x": possibleAdjectives = ["Xylophone-playing"]; break; case "y": possibleAdjectives = ["Yodeling"]; break; case "z": possibleAdjectives = ["Zero-badness"]; break; } return randomElement(possibleAdjectives); } function nameToAdjective() { for (let letter of name) { console.log(letterToAdjective(letter)); } } nameToAdjective();
For now I only want the C code and nothing else.
Assistant