0
0
Goprogramming~10 mins

Why testing is required in Go - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to print a message about testing importance.

Go
package main

import "fmt"

func main() {
	fmt.Println("Testing is important because it helps to [1] bugs early.")
}
Drag options to blanks, or click blank then click option'
Adetect
Bignore
Chide
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing words like 'ignore' or 'hide' which do not fit the purpose of testing.
2fill in blank
medium

Complete the code to explain why testing saves time.

Go
package main

import "fmt"

func main() {
	fmt.Println("Testing saves time by [1] costly fixes later.")
}
Drag options to blanks, or click blank then click option'
Apreventing
Bdelaying
Cignoring
Dcausing
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting words that imply causing or ignoring problems.
3fill in blank
hard

Complete the code to print why testing improves code quality.

Go
package main

import "fmt"

func main() {
	fmt.Println("Testing improves code [1] by catching errors.")
}
Drag options to blanks, or click blank then click option'
Alength
Bspeed
Cquality
Dcomplexity
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing unrelated words like speed or length.
4fill in blank
hard

Fill both blanks to complete the sentence about testing benefits.

Go
package main

import "fmt"

func main() {
	fmt.Println("Testing helps to [1] bugs and [2] software reliability.")
}
Drag options to blanks, or click blank then click option'
Afind
Bbreak
Cincrease
Dreduce
Attempts:
3 left
💡 Hint
Common Mistakes
Using words that imply causing problems instead of fixing them.
5fill in blank
hard

Fill all three blanks to explain why testing is required.

Go
package main

import "fmt"

func main() {
	fmt.Println("Testing [1] bugs, [2] code quality, and [3] confidence in software.")
}
Drag options to blanks, or click blank then click option'
Afinds
Bimproves
Cbuilds
Dhides
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'creates' or 'hides' bugs which is wrong.