The correct and most compact form of that incorrect code you posted would look like this (your code is not the right way to use Then and Else:
"You will eat potatoes"->Str1
"You will code a basic program"->Str1
Sorry, just wanted to make it even smaller...
"You will eat potatoes
If randInt(0,1:"You will code a basic program