by zitterbewegung · 4y ago · 0 comments
To be honest there should be a class called language model querying because for simple tasks it does well but eventually you will have to debug the output (not just copilot but GPT3 and dall-e).
# I solved this problem by using the % operator to get each digit from the number. I declared and initialized a sum variable to keep track of the sum of the digits of the number. I set a temp variable equal to the input number. I then used a while loop to loop through each digit of the number. In the loop, I used the % operator to get the remainder of temp divided by 10. This gave me the last digit of the number. I added this digit to the sum variable. I then divided temp by 10 to remove the last digit of the number. I repeated these steps until all of the digits of the number were added to the sum variable. Finally, I printed the value of the sum variable.There's an AI for that!
Do you think the skills taught in that class would be relevant for very long?
That's why getting an Internship is always a good idea.