Ask coding questions

Guide to Asking Coding Questions
# **Guide to Asking Coding Questions** ## **Why?** Good questions help your question be solved faster, and people will want to answer your question Bad questions waste time, you will often not get answers that you asked for, and people will often ignore your questions ## **Quick Questions Guide** ### Do This - Always ask your questions in English - Explain what you want the code to do - Explain what the code does - Include error messages - Share the repl with the line numbers - When you figure out the answer, update your post - Put the repl link, instead of pasting code ### Don't Do This - Don't post homework questions - Don't use caps in the title - Don't use words like 'HELP' or 'PLEASE' in the title - Don't post questions that already have an answer (Search Box) - Don't post feedback or bugs on Talk, use []( for feedback, or []( for bugs ## **Steps For Better Questions** 1. Understand the code - Read your code and figure out what each line does - If a concept is unfamiliar, Google it - You can also use a debugger to help you 2. Describe the problem - Explain what you want the code to do - Explain what the code does (error messages) 3. Provide the code - Share a repl that has your code - Share the line number(s) of your code issue - Make sure that the code you shared has the issue 4. Format code consistently - Make sure your code is easy to read 5. Check for typos - Make sure the code does not have any typos that would cause the problem 6. Explain what you did to troubleshoot the problem - Make a list of what you think the problem is and try to fix your problem by going through the list 7. Make a guess on what you think the problem might be - Use the list from the previous step 8. Proofread the question - Make sure you provided everything - Clear all confusions that you think there might be 9. Update people on the question - If you figured out the answer, edit the post to tell people - When you get an answer, fully understand it - Be nice to people who answer your question - Remember that the people wanted to answer your question, but didn't have to 10. Things to NOT do - Don't post homework questions - Only post questions in English - Do not use caps in the title - Do not use "HELP" or "PLEASE" in the title - Don't post questions that have already been answered (Use search box) - Don't post feedback or bugs on Talk, use []( for feedback, or []( for bugs ## **Example:** ### **Question** We have some Python code with an error: [repl]( ```python rannumexe = int(input()) if rannumexe = 1: print('hi' + rannumexe) ``` ### Step 1 We show what each line does using comments. ```python rannumexe = int(input()) # Asks the user to input a rannumexe if rannumexe = 1: # If the rannumexe equals 1 print('hi' + rannumexe) # Print hi and the rannumexe ``` ### Step 2 We want the code to input a number, and if the number is one, print "hi" and the number. Our problem is that we have an invalid syntax error on line 2 in the file. ``` File "", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` ### Step 3 Our repl with the issue is located [here]( We have an issue on line 2 ### Step 4 We can change "rannumexe" to "number" to clear confusion ```python number = int(input()) # Asks the user to input a number if number = 1: # If the number equals 1 print('hi' + number) # Print hi and the number ``` ### Step 5 We don't have any typos ### Step 6 Our problem could be that we improperly used the if statement ### Step 7 The problem could be about using the if statement incorrectly ### Step 8 Our final question: Title: Invalid syntax error about equal signs Content: I have an invalid syntax error on line 2 in the file of this [repl]( The program should take a number as an input, check if the number is equal to one, and if so, print "hi" and the number. The error point to the equal signs and I think this issue is with the incorrect syntax of the if statement. Help is appreciated :). ```python number = int(input()) # Asks the user to input a number if number = 1: # If the number equals 1 print('hi' + number) # Print hi and the number ``` ``` File "", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` Steps based on Gordon Zhu's [post]( If you have any suggestions or feedback, post it in the comments below.
posted by Mosrod (235) 8 months ago
What advice would you give to someone new to coding?
In the spirit of our new ask features... * What advice would you give to a newbie? * And what advice do you wish someone had given you? * What advice would you give me, personally?
posted by katyadee (429) 2 days ago
What's your favorite thing about What about your least favorite?
What's your favorite thing about IDEs in general? What about your least favorite? (Slash if you could add any feature, what would you add?)
posted by katyadee (429) 5 days ago
Secret Message: Need a clarification, Not an Answer
I have been googling (Not a great idea, its google) and what ive turned up is that .xn-- is another form of an international web link" XN may refer to: "xn--" in the ASCII representation of internationalized domain names." Just want to know if im barking up the wrong tree and this is just part of the encryption Thanks, Masy
posted by Masy (12) 5 days ago
invalid syntax
Hi everyone. I get "invalid syntax" on this: for i in range(1, n) print (t[i], F[i]) ..where t, F and n of course are defined. Why the error message?
posted by GustavW (0) 18 hours ago
Default name challenge
Create a default-named repl and do whatever the name says Submit your repls here
posted by mkhoi (158) 15 days ago
My program won't run!
Please correct my code: Number = int(input("Enter a number")) step2 = print("now double your number", Number) step3 = int(input(step2)) if step3 == Number * 2: step4 = int(input("Now add 4")) else: print("You are incorrect, please try again") if step4 == step3 + 4: step5 = int(input("Now halve your number")) else: print("You are incorect, please try again") if step5 == step4 / 2: step6 = int( input("Now substract the number you have now from your first number", Number)) else: print("You are incorrect, please try again") if step6 == step5 - Number: print("Your number is 2") else: print("You are incorrect, please try again")
posted by AbdulQurashi (2) 2 days ago
What was your first language and what did you make with it?
What was your first language and what did you make with it? Me... I learned some rudimentary HTML & CSS on Neopets and made a fan site for MTV TRL veejay Jesse Camp, who was my celeb crush at the time. (Bonus points for anyone old enough to remember him.) I think that counts, right?
posted by katyadee (429) 13 days ago
4 or code issue?
I've started a coding club in our school, and we have been collaboratively creating a game in Python with Turtle. It worked just fine until last week. Now for some of the computers (everyone is on Chromebooks) the opening screen turtle drawer just takes off and the game freezes for about 5 minutes. For others the game still functions as expected. I have tried debugging, but there is no error I can see in the code and as it occurs only on certain machines I am wondering if it is a issue and not a code issue. I have also put the code into other online editors and it runs perfectly. We can't install IDE's on the Chromebooks (school division controlled) and we like for it's multiplayer capacity. Any ideas? The issue generally occurs while drawing the "a" in "tank", but if you comment that section out the issue will occur elsewhere in the title drawing process. I'd love to get this working again so we can continue with it. But it's very hard to test it when it only runs on one machine. Edit* See link:
posted by ChristopherBurn (3) 6 days ago
Secret Message
I got an email this week, containing a secret message! I wasn't able to decipher it, but has anyone else been able? Don't tell us how to(no spoiling), just tell us if you did!
posted by Steven_The_GuyT (140) 6 days ago
What should I make
I'm a beginner in python, and I don't know the big stuff. What should I make, and where can I learn more about the basics?
posted by CompleteStrange (9) 13 days ago
trouble with pygame keyboard input
Whenever I press "w", it wont register my input. It isn't the code inside of the if statement because it isn't even printing "w"
posted by EthanCulp (0) 18 hours ago
43 Mobile App
As some of you may know, isn't the most mobile-friendly website. I'm considering making a mobile app for it, and I'm asking the community: Would you be interested in this? Would you use it if it was good enough? And does anyone here want to help contribute? I'm open to any suggestions about technologies to use and I'm up to learning something new. Please upvote or comment if you'd use it and comment if you want to help. And if you aren't interested I'd love to hear why. Thanks! **UPDATE:** Until there's something more official, I made [a Discord server]( **UPDATE 2:** I just [released our MVP](!!!
posted by Kognise (142) 23 days ago
Argparse, setting parameters, etc.
Hi community, I'm on the verge of losing my mind! Please read the following file, if you can: What I need to know is if every step of this assignment can be done in - especially the 'edit configurations' part. The issue is that my device (chromebook) can't use PyCharm. has worked perfectly for all of our other assignments, but I'm not sure about this one. I came to my school's campus to use PyCharm to try and work on it, but I can not for the life of me understand how it works - especially since I've been using Repl this entire quarter. I'm really panicking because I don't have much longer to work on this, and it's my last quarter of college and I HAVE to pass this class (I'm doing fine right now, but I can't miss an assignment). Also, despite what you might think, I didn't wait until last minute! I've done most of the work already. The work I've done, though, is through hard-coding in the .csv files. That's not the goal of my assignment (as you can see), my code has to work alongside some sort of run configurations. All I'd have to do is slightly modify what I have so that it runs correctly. The only reason it seems last-minute is is because I hit a point where I don't know how to continue this assignment with Any help at all would be greatly, greatly appreciated. Again, I'm not looking for answers to my homework. I just need to know if my assignment is even possible here. Thank you . T_T
posted by marqyJr (1) 2 days ago
Web Filter Bypass
Hello, everyone. I was wondering if there is a way to bypass a web filter with code. I'm sure there is, but with the chromebook I want to use, there doesn't appear to be a code manager or a code window that I can open up. Please help!
posted by 20rduncan (7) 13 days ago
Python vs Java
Hey :) I'm a learner of C/C++ and LOLCODE; I'm nearly finished with both, so I'm thinking of a 'second' (rather, third) language. I'm getting confused of which to learn between Java and Python. People around me say that Java's more useful, while Python is easier to learn. What's your opinion? And why? Leave it below:)
posted by AquaMarine0421 (21) 15 days ago
Not waking up
I can't get the to wake up on my script pls help me! Here is the link:
posted by TheSpeakingLava (0) 1 day ago
What do you call people who use
Reddit has Redditors, but what about Repl? Are we Repelers? Replers? Just the general "Coders"? There might already be an official answer to this question somewhere, but I couldn't find it, so please let me in on the secret. If there isn't an official answer, (or if you don't know it,) feel free to comment your guesses below.
posted by Four_Of_Clubs (75) 12 days ago
Variable not in scope
For every piece of code that I wrote, I get ''variable not in scope''. (for example : length1 :: [a] -> Int length1 l | l==[] =0 | otherwise = 1 + length1 tail l ) some of the other solutions i tried are written by my teaher.
posted by sara_n (2) 10 days ago
Which is better: Terraria vs. Minecraft??
Which one's better? Please type in the comments below and try to convince me about which one's better. I'm having such a difficult time deciding. Please help!
posted by CollinKunsman (17) 27 days ago
Functions in python
Hey everyone, I'm a new python dev and i'm trying to familiarize myself with functions. for my first functions project, I tried making a miles to km converter, but I'm running into an error. can someone tell me what I did wrong and how to fix it. Thanks.
posted by mhs_mhs123 (4) 4 days ago
How Did YOU Find is one of many online coding platforms. How did you find this one? Did you do a google search? A friend? Why did you choose over the many others that exist out there. Currently is one of the most popular. I will say that if i google's filtering and searching system were different, i wouldn't have found it. I found with `online python3`. Comment below your own story! ### Reasons so far: + Coding on multiple computers + Learning at school + Looking for better online compilers/interpreters + Searching on google for online <coding language> + Friends + Coding in school without downloading interpreters/compilers + Making games that wouldn't work on normal compilers/interpreters + Entering competitions that require + Storing code online. To show other people, or other uses It's really cool to see how other people found If I had been told to list as many reasons as I could, I would have gone with Bullet 1, Bullet 2, Bullet 3, and maybe Bullet 5.
posted by PYer (1848) 2 months ago
Student accidentally deleted code - any way to get prior version of program?
Hi! One of my students just emailed me that they were working on their final project and they accidentally deleted 100 lines of code from their program. Is there any way for them to access prior versions of their code so that they can reconstruct what they deleted? Thanks! Kate
posted by kmcleod (1) 3 days ago
Online Remote Desktop
Does anyone know how to or if theres a progrom on here that allows you to connect to a windows server and be able to access its desktop?
posted by Masy (12) 15 hours ago
import time addvariable = input("Give me a number") addnumber = input("give me a second number") print("your answer is...") time.sleep(1) print(addnumber + addvariable) timesvariable = input("give me a number") timesnumber = input("give me a second number") print("your answer is...") time.sleep(1) print(timesvariable * timesnumber) why cant i get my code to multiply or add???!!!!
posted by James193 (11) 6 days ago
Having trouble with an "elif" statement
posted by GarretOgden (3) 20 days ago
A lot of things
NOTICE: Some of these aren't questions, just suggestions. There's still questions though. #1: @katyadee: Really, you should add a description for your account on Wikipedia. #2: Any and all rep-lit creators: There should be a talk on people's profiles. #3: @21natzil: SOLVED Maybe you could call us replitears. Has a nice sound to it. @21natzil says: I'll try to remember replitears for the weekly repls. 😉 #4: @katyadee again: GET HACKER PLAN (I had to caps lock) (even though I don't have it) Solved: @katyadee says: I don't need a Hacker plan, I'm an admin so I already have the features. LOL. #5: @katyadee again: Turn on explorer mode. SOLVED #6: @katyadee: Get content creator title. #7: Everyone: SOLVED How do you get content creator title? @PYer says: You get the content creator tag by posting a good tutorial. #8: Any and all rep-lit creators: There should be more tags. @PYer says: add a tag for being on the leaderboard. add a tag for the team, and jam winners. also add an online sign so you can see if anybody is on #9: Any and all rep-lit creators: There should be a way to see everybody and search for them. #10: Any and all rep-lit creators: If you do #9 and #8, remember to make a way to categorize people by tags. #11: Any and all rep-lit creators: I repeat, more tags. Like Pythonear (Python doer) or Cer (C doer). #12: Everyone: Can someone get a list of the staff and the moderators for me? @a5rocks says: #13: Any and all rep-lit creators: Maybe there could be titles that go next to your username. #14: Any and all rep-lit creators: Maybe there should be privileges, for those who have a lot of votes, like free hacker plan. #15: @ebest: Why are you doing this? #16: @ebest: Why *_are_* you doing this? #17: Any and all rep-lit creators: What's the maximum character limit for a post? #18: Any and all rep-lit creators: Because I'm nervous I'm close. #19: @ebest: Because it's fun. #20: @everyone: Is there a way to figure out who's online? Have fun reading! I hope some of those things happen. #21: @ebest: *_BECAUSE WHY NOT_* -ebest
posted by ebest (163) 13 days ago
11's birthday?
I have been coding on for a month!!! But i still dont know when did they release Help!
posted 12 days ago
What language?
If you have to stick with 1 programming language __forever__ for everything that you write... What would it be? Ps: also remember about what language your career needs, your personal favorites... too And apparently Python and JS are the most popular choices
posted by mkhoi (158) 29 days ago
Review My Portfolio Website (Beta)
I have tried and tried again to make a portfolio website I actually enjoy (see my history). However, I have finally built one that I liked enough to make mobile-responsive, and want some feedback for things to do better, and your thoughts and feedback. The site is not finished, however, I plan to work on it in the coming days and weeks.
posted by EthanJustice (10) 8 days ago