// // ViewController.swift // The Test Taker // import UIKit class ViewController: UIViewController { @IBOutlet weak var questionLabel: UILabel! @IBOutlet weak var questionTextView: UITextView! @IBOutlet weak var answerLabel: UILabel! @IBOutlet weak var answerTextField: UITextField! @IBOutlet weak var scoreLabel: UILabel! var currentQuestion = 0; var questions = [String]() var correctAnswers = [String]() var usersAnswers = [String]() func updateScoreLabel() { // FINISH ME // create a variable called numCorrect // assign to numCorrect the number of // questions answered correctly // call getNumCorrect() let ?????? = ???????? // FINISH ME // create a variable called numQuestions // assign to numQuestions the number of // questions // use questions.???? let ???????? = questions.?????? // FINISH ME // create a variable called pct // and store the percent correct // call getPCT let ??? = ????? // FINISH ME // store in the text field something like: // Score: 3/4 75% // 3 is the numCorrect, 4 is the numQuestions, and 75 is the pct scoreLabel.???? = "Score: \(??????)/\(???????) \(???)%" } func getPCT() -> Double { // FINISH ME // create a variable called numCorrect let ??????? = getNumCorrect() // FINISH ME // convert numCorrect to a Double let pct = Double(????) / Double(questions.count) * 100 // FINISH ME // return the pct ?????? } @IBAction func updateScoreButtonEvent(_ sender: UIButton) { usersAnswers[currentQuestion] = answerTextField.text! // FINISH ME // call updateScoreLabel() ????????? } func getNumCorrect() -> Int { // FINISH ME // create a variable called numCorrect and // set it to 0 var ??????? // FINISH ME // LOOP from 0..