Sfida: Commenti in Go
Compito
Commentare l'istruzione che deve essere nascosta e decommentare l'istruzione che deve essere mostrata nel seguente codice.
index.go
1234567package main import "fmt" func main() { fmt.Println("This sentence should not be outputted") //fmt.Println("This sentence should be outputted") }
- Utilizzare
//per commentare una riga in Go. - Nascondere la prima istruzione di stampa.
- Rimuovere
//dalla seconda istruzione per visualizzarla.
package main
import "fmt"
func main() {
//fmt.Println("This sentence should not be outputted")
fmt.Println("This sentence should be outputted")
}
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 9
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Can you explain why we need to comment out the first print statement?
What does the output look like after making these changes?
Can you show me how to comment and uncomment lines in other programming languages?
Awesome!
Completion rate improved to 1.96
Sfida: Commenti in Go
Scorri per mostrare il menu
Compito
Commentare l'istruzione che deve essere nascosta e decommentare l'istruzione che deve essere mostrata nel seguente codice.
index.go
1234567package main import "fmt" func main() { fmt.Println("This sentence should not be outputted") //fmt.Println("This sentence should be outputted") }
- Utilizzare
//per commentare una riga in Go. - Nascondere la prima istruzione di stampa.
- Rimuovere
//dalla seconda istruzione per visualizzarla.
package main
import "fmt"
func main() {
//fmt.Println("This sentence should not be outputted")
fmt.Println("This sentence should be outputted")
}
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 9