+Ark1002 Posted September 10, 2019 Posted September 10, 2019 So, as you may or may not know, there's a little button labeled code up at the top, looking like the less than sign and the greater than sign by each other. When you type in it, it looks like this djkdkjab Supposedly, you can use it to code... something. It has an option for python, so I was messing around with it to see if I could figure it out. I wrote something like this name = input("What is your name? ") print("Hello " + name + "!") This would get input (ex: Ark) , then say Hello Ark! It didn't work. I just assumed it didn't work because I couldn't get input on this. So I tried something really simple print("Hello") This should just say the word Hello, very simple, very easy. But nothing happened. So could someone explain to me what the Code option actually does? I know it's doing something, as it color codes the parts of the script, just like a real coding website would do. Does it just not actually support Python? Am I just doing something wrong? Have I missed something? Thanks in advance. -Ark
luckat she/her Posted September 10, 2019 Posted September 10, 2019 Like the other buttons around it, the Code option is a formatting option. It sets the text apart and formats it to look like code. Specifically, it maintains whitespacing and indentation and uses a monospaced font (and highlights the text if you select the language it is from). It's useful if you want to share code on the forums or if spacing is important, but it doesn't compile or run the code at all. 1
Chaos he/him Posted September 10, 2019 Posted September 10, 2019 luckat is correct. It's for sharing code so it appears formatted correctly. No code runs on the editor; that'd be super dangerous for any website to do. 2
+Ark1002 Posted September 11, 2019 Author Posted September 11, 2019 thanks! The code function did seem weird, but that makes a lot more sense.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now