Problem with lists

Hello! I have a problem…This program returns nothing… why?
so if the number is 0 or 1 or 2 or 3 it should print yellow and if the number is 5 or 6 or 7 it should print black
I gave the program number 0, but it prints nothing. Thanks!


What does it print?

It prints nothing ( empty space) … it should print yellow


Try by assigning string

color = "yellow"

color = "black"

The variable type of color should be string

on a first look on code and description have a check if not a color variable wit same name is present within a deeper scope. For this a stepwise debugging is hhelping for identification the location where it is breaking.

Another technique could also be a lookup dictionary

dictColMap =
New Dictionary(Of String, List(Of Int32)) From {

So we can get the color by number with following line

And will get:

Find starter help here:
GetKey_ByNumber_ContainsInValue.xaml (6.0 KB)