Create another function called “PassOrFail” that will accept the array “grades”. Then call the function “PassOrFail” inside of the function UserInput and pass the array as a parameter.Ĥ. Have the function also output the array to the screen. ![]() Do input validation to make sure that only numbers in between 0 and 100 (inclusive) will be stored in the array. Make sure that the grades are between 0 and 100. Create a function named “UserInput” that will ask the user to input their last 5 grades (using some sort of loop) from their homework (make these up) and store that in an array named “grades”. Call the “UserInput” function from inside “UserName”.ģ. Store the user’s name in two new text documents named “Pass.txt” and “Fail.txt”. Create a function named “UserName” that will ask the user for their name and store that as the variable “name”. ![]() Make a comment block at the top of your script with your name, rank, and title of your script.Ģ.
0 Comments
Leave a Reply. |