uno compatibility with nano
Will code developed on Arduino Uno work on Arduino nano?
As far as the code language itself, yes. The only differences would be if you're trying to use hardware functionality that isn't there. Uno has more pins available than the Nano, so you might have to make sure you're using pins that are available on both.
Code usually even transfers to other MPUs... like ESP8266 and ESP32. Again, it's mostly about what are the common capabilities of the hardware.
3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide
You can test it yourself, just goto Tools/Board and change Uno to one of the Nano's. Then simply re-verify your code. If it compiles clean then the answer is YES for that code.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.