<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>go on Progmeister</title>
    <link>https://progmeister.ch/categories/go/</link>
    <description>Recent content in go on Progmeister</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 15 May 2020 00:00:00 +0200</lastBuildDate>
    
	<atom:link href="https://progmeister.ch/categories/go/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Files</title>
      <link>https://progmeister.ch/blog/problems/files/</link>
      <pubDate>Fri, 15 May 2020 00:00:00 +0200</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/files/</guid>
      <description>Assume an input file of the following format is provided:
N i_1 i_2 ... i_N N is the number of integers below in the file. i_1&amp;hellip;i_N are the integers.
Write a program that reads the integers from the file and writes them in a new file. The output file must contain the number of integers first, then odd integers in the same order as in the input file, and then even integers in the same order as in the output file.</description>
    </item>
    
    <item>
      <title>Strings</title>
      <link>https://progmeister.ch/blog/problems/strings/</link>
      <pubDate>Thu, 07 May 2020 00:00:00 +0200</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/strings/</guid>
      <description>Implement a function func trimLeftSpace(s string) string that returns a slice of the string s with all leading space characters (https://en.wikipedia.org/wiki/Space_(punctuation)) removed:
Example:
trimLeftSpace(&amp;quot;gopher&amp;quot;) -&amp;gt; &amp;quot;gopher&amp;quot; trimLeftSpace(&amp;quot; go goper&amp;quot;) -&amp;gt; &amp;quot;go gopher&amp;quot;   Implement a function func trimRightSpace(s string) string that returns a slice of the string s with all trailing space characters (https://en.wikipedia.org/wiki/Space_(punctuation)) removed:
Example:
trimRightSpace(&amp;quot;gopher&amp;quot;) -&amp;gt; &amp;quot;gopher&amp;quot; trimRightSpace(&amp;quot;go goper &amp;quot;) -&amp;gt; &amp;quot;go gopher&amp;quot;   Implement a function func trimSpace(s string) string that returns a slice of the string s with all leading and trailing space characters (https://en.</description>
    </item>
    
    <item>
      <title>Structs</title>
      <link>https://progmeister.ch/blog/problems/structs/</link>
      <pubDate>Thu, 07 May 2020 00:00:00 +0200</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/structs/</guid>
      <description>Useful links  orders.csv file with information about orders. It contains purchase entries:  buyer&amp;rsquo;s email name of the item item quantity date of the purchase.   A sample program that processes orders.csv.  Exercises Exercises 0a, 0b, and 0c are implemented in the sample program attached above.
Write a program that opens orders.csv, reads it and transforms into a struct. Bonus points for storing a purchase date as time.</description>
    </item>
    
    <item>
      <title>Slices</title>
      <link>https://progmeister.ch/blog/problems/slices/</link>
      <pubDate>Thu, 30 Apr 2020 00:00:00 +0200</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/slices/</guid>
      <description>Implement a function func removeEven(s []int) []int that removes even numbers from the input slice, and returns a new slice with the remaining numbers in the same order as a result.
Example:
removeEven([]int{5, 2, 3, 6, 2, 3}) -&amp;gt; []int{5, 3, 3} removeEven([]int{1, 3, 5}) -&amp;gt; []int{1, 3, 5} removeEven([]int{2, 4, 6}) -&amp;gt; []int{}   Implement a function func generateFibonacci(n int) []int that returns a slice containing the first n elements of the Fibonacci sequence (wiki).</description>
    </item>
    
    <item>
      <title>Arrays</title>
      <link>https://progmeister.ch/blog/problems/arrays/</link>
      <pubDate>Fri, 17 Apr 2020 00:00:00 +0200</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/arrays/</guid>
      <description>Implement a function func maxMin(arr [10]int) (max, min int) that returns the maximal and minimal numbers from the array.
  Implement a function func countMax(arr [10]int) (count, first uint) that calculates how many times the maximal value is present in the array (returned as a variable count) and an index of the first occurrence (returned as a variable first).
  Implement a function func posNegZeros(arr [10]int) (pos, neg, zeros uint) that calculates and returns the number of positive (pos), negative (neg) and zeros (zeros) in the array.</description>
    </item>
    
    <item>
      <title>Linear Program: Conditions</title>
      <link>https://progmeister.ch/blog/problems/conditions/</link>
      <pubDate>Sat, 14 Mar 2020 00:00:00 +0100</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/conditions/</guid>
      <description>In all programs the input should be entered using the keyboard.
 Write a program that performs km/h &amp;lt;-&amp;gt; m/s speed conversion. The program should show a selection menu, e.g. This program performs km/h &amp;lt;-&amp;gt; m/s speed conversion. Please enter (a) if you want to convert km/h to m/s; (b) if you want to convert m/s to km/h.  Write a program that compares two numbers. The program should output -1 if the first number is greater than the second one, 1 if the second number is greater than the first one, and 0 if the numbers are equal.</description>
    </item>
    
    <item>
      <title>Linear Program: for-loops and functions</title>
      <link>https://progmeister.ch/blog/problems/functions/</link>
      <pubDate>Sat, 14 Mar 2020 00:00:00 +0100</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/functions/</guid>
      <description>Given integer n as an input, write a program that determines if n is a power of 2. In this case, print the power value.
Implement a function func power2(n uint) int, which returns the power value, or -1, if n is not the power of 2.
Example:
power2(8) = 3   Given integers n and k as an input, write a program that determins if n is a power of k.</description>
    </item>
    
    <item>
      <title>Linear Program: Problems</title>
      <link>https://progmeister.ch/blog/problems/linear/</link>
      <pubDate>Sat, 14 Mar 2020 00:00:00 +0100</pubDate>
      
      <guid>https://progmeister.ch/blog/problems/linear/</guid>
      <description>Given two positive numbers that denote sides $a$ and $b$ of a rectangle, write a program that prints the perimeter and the square. Example:
Input: a = 5, b = 7 Output: perimeter is 24, square is 35   Write a program that converts the speed in km/h to m/s. Example:
Input: 36 Output: 10   Write a program that converts the Celsius temperature to the Reamur, Kelvin and Fahrenheit temperatures using these formulas.</description>
    </item>
    
    <item>
      <title>Installation for Go, Geany and Visual Studio Code</title>
      <link>https://progmeister.ch/blog/installation/</link>
      <pubDate>Wed, 04 Mar 2020 00:00:00 +0100</pubDate>
      
      <guid>https://progmeister.ch/blog/installation/</guid>
      <description>In our course we use Go as the main programming language. Furthermore, in order to benefit from various development tools that Go provides, such as syntax highlighting, error checking, autocompletion, autoformatting, etc, we encourage students to install and set up an IDE that has a full-fledged support for Go language. You suggest to choose between Geany and Visual Studio Code. Geany has less features, but is also faster and has simpler installation than Visual Studio Code.</description>
    </item>
    
  </channel>
</rss>