govinda

command module
v0.0.0-...-b55c79a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2021 License: GPL-2.0 Imports: 1 Imported by: 0

README

govinda

Go excercises

Documentation

Overview

Declare a struct that represents a baseball player. Include name, atBats and hits. Declare a method that calculates a player's batting average. The formula is hits / atBats. Declare a slice of this type and initialize the slice with several players. Iterate over the slice displaying the players name and batting average.

Declare a nil slice of integers. Create a loop that appends 10 values to the slice. Iterate over the slice and display each value.

Declare a slice of five strings and initialize the slice with string literal values. Display all the elements. Take a slice of index one and two and display the index position and value of each element in the new slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL