The original code doesn't compile. The way one works through that is to check the first error in compilation, fix what's causing that (often a mistake on the line before the reported error), then iterate (with IDE autoformatting to check for sane nesting).
The #1 code gives these errors in Wokwi:
UnoScope.ino: In function 'void setup()':
UnoScope.ino:20:3: error: expected ';' before 'pinMode'
pinMode(ledPin; OUTPUT)
^~~~~~~
UnoScope.ino:20:25: error: expected ';' before ')' token
pinMode(ledPin; OUTPUT)
^
UnoScope.ino: At global scope:
UnoScope.ino:23:1: error: expected initializer before 'bout'
bout = digitalRead(inputPin);
^~~~
UnoScope.ino:24:1: error: expected unqualified-id before 'if'
if (bout == HIGH);
^~
UnoScope.ino:25:1: error: expected unqualified-id before '{' token
{
^
UnoScope.ino:28:1: error: expected unqualified-id before 'else'
else
^~~~
Error during build: exit status 1
the first error is that this line does not have a semicolon on the end of it:
@gcjr worked through those to make it compile, (worked for me) and printed a 'diff' detailing all the changes.
Most of your code is good, but small mistakes cause programs to stop. This looks like an image-to-text was used on screen-shots of the code. There are three extra semi-colons (;), two missing semi-colons, a missing open brace, a missing close brace, and a word replacement issue. Then it works (press the button to light the LED). Keep correcting the errors, one at a time.