If you have an iPad Apple has “Swift Playgrounds” — I think there are three “levels” — and they’re more or less a game that teaches you the basics of programming. Things like variables and for loops and objects and properties. It’s cute and simple and definitely geared towards kids but a surprisingly comprehensive introduction to coding.