Assessment (Go)
Please complete all sections: Multiple Choice, Fill in the Blank, Short Answer, and the Practice Task.
Applicant Information
Name
*
First Name
Last Name
Email
*
example@example.com
LinkedIn
*
Country
*
Back
Next
Part A — Multiple Choice
Which Go standard library package provides SHA-256 hashing?
*
crypto/md5
crypto/sha256
hash/fnv
encoding/hex
Which Go mechanism helps prevent data races when multiple goroutines touch the same shared ledger state?
*
Goroutines alone
sync.Mutex / channels
The garbage collector
Interfaces
What is the idiomatic Go way to signal that an operation on a ledger failed (e.g. insufficient balance)?
*
Always panic()
Return an error value
os.Exit(1)
Ignore it
Back
Next
Part B — Fill in the Blank
To compute a SHA-256 hash of a byte slice in Go, you call sha256.______(data).
*
Go's built-in error-handling convention returns a value of the built-in ______ type as the last return value.
*
In a typical Go blockchain block struct, the field storing the hash of the prior block is usually named ______.
*
Back
Next
Part C — Short Answer
Why might you use a sync.Mutex when multiple goroutines append blocks to the same chain concurrently?
*
What's the difference between returning an error and calling panic() in Go, and when would you use each in ledger code?
*
Explain why recomputing and comparing a block's hash is important for detecting tampering.
*
Should be Empty: