<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Assignables",
  "identifier" : "/documentation/Assignables/AssignableDocument/computeMaxScore(defaultQuestionMaxScore:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Assignables"
    ],
    "preciseIdentifier" : "s:11Assignables18AssignableDocumentV15computeMaxScore015defaultQuestioneF0SdSgAF_tF"
  },
  "title" : "computeMaxScore(defaultQuestionMaxScore:)"
}
-->

# computeMaxScore(defaultQuestionMaxScore:)

Computes the maximum possible score for this `AssignableDocument` as defined
by each individual question’s `maxScore`.

```
func computeMaxScore(defaultQuestionMaxScore: Double? = Double.zero) -> Double?
```

## Parameters

`defaultQuestionMaxScore`

If a question has a `nil`
`maxScore` value, the value that should be used instead.

## Return Value

The maximum possible score for this `AssignableDocument` as defined
by each individual question’s `maxScore`. `nil` is returned, if any individual’s `maxScore` is `nil`
and `defaultQuestionMaxScore` is `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)