00
Days
00
Hours
00
Mins
00
Secs
Discord Bots Challenge / Ends November 26
🎁 Prizes: Discord Swag, Hacker Plans, Repl Talk Cycles

Ask coding questions

Posts
Pinned
33
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 ### 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 have already been answered (Use search box) - Don't post feedback or bugs on Talk, use [repl.it/feedback](https://repl.it/feedback) for feedback, or [repl.it/bugs](https://repl.it/bugs) 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 constantly - Make sure you 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. Thing 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 [repl.it/feedback](https://repl.it/feedback) for feedback, or [repl.it/bugs](https://repl.it/bugs) for bugs ## **Example:** ### **Question** We have some Python code with an error: [repl](https://repl.it/@Mosrod/Question-Tutorial) ```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 main.py file. ``` File "main.py", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` ### Step 3 Our repl with the issue is located [here](https://repl.it/@Mosrod/Question-Tutorial). 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 main.py file of this [repl](https://repl.it/@Mosrod/Question-Tutorial). 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 "main.py", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` Steps based on Gordon Zhu's [post](https://medium.com/@gordon_zhu/how-to-be-great-at-asking-questions-e37be04d0603). If you have any suggestions or feedback, post it in the comments below.
13
posted by Mosrod (141) about 2 months ago
0
homework help
You will notice that this code allows for interactive input using the Scanner class. Run the program with at least 2 different sets of input, including negative and positive values. Print the output screen for each set of input int age; Scanner input = new Scanner(System.in); System.out.print("Enter age: "); age = input.nextInt(); while(age <= 0){ System.out.println("Must be positive. "); System.out.print(" Enter age: "); age = input.nextInt(); } System.out.println("You entered " + age);
28
posted by SandyyyNwankwo (0) about 15 hours ago
8
Can you make the notifications page work?
There is a page [Notifications](https://repl.it/notifications), that does nothing. I think that it could have good potential if it was actually used. I think that you should get notifications when someone up votes your post, comments on your post, or pings you. Also, you could make it so that it told you when you moved a position on the leaderboard. It could also tell you whenever a new competition started, or when one of your posts got pinned. If anybody else has some ideas they want the page to say, comment below please! Thank you!
4
posted by fullern000 (671) 6 days ago
4
error installing discord.py
my error is ``` Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-epetax/aiohttp/ ``` i also get this ``` aiohttp requires Python 3.4.2+ ```
9
posted by illegalalienal (6) 5 days ago
19
Music you guys listen to
Do you regularly listen to music? If so, what genres and artists of music?
55
posted by JSer (894) about 1 month ago
11
My first coding class with Tim. thoughts?
I'm learning more how to code with @timmy_i_chen what do you think I should learn?
13
posted by hayaodeh (53) 20 days ago
2
adding new objects through functions
so i have this class called Player and when a function is called i want it to create a new object any suggestions? also you will have to play the game to see this but it will let me buy items but not use them. https://repl.it/@Nanowrimoijk/Factions
6
posted by Nanowrimoijk (1) 4 days ago
1
How to email someone
I am trying to learn how to email somebody using nodeJS. I have seen some answers online elsewhere, but they don't work. Can someone please tell me how to make a repl that can email someone and actually works?
9
posted by Coder100 (2) 6 days ago
8
Girl wants to get good at coding...
Hi, my name is Cate and I recently discovered I had an interest in coding so with literally zero experience I started teaching myself python using pycharm IDE. I understand concepts pretty well, but there is soooo much information out there, does anyone have any tips for a n00b like me? Or advice for narrowing down a direction in regards to learning? Any help is appreciated!!
28
posted by catejenn (11) about 1 month ago
8
Vacations
If you were able to go on a vacation ANYWHERE where would you go and why?
21
posted by IEATPYTHON (133) about 1 month ago
1
Hi. Me again
Hey everyone. I have a not-so-slight issue. So for this code I'm writing, a three digit number is inputted, and if the digits are in ascending order the code outputs YES and if it is not, the code outputs NO. So I was trying to make the number into a list, do the thing where a variable was assigned to each item on the list, and then find out if the digits are in ascending order using an if/else statement, but then I realized my list was in string form. So, I tried to convert to integer form. I did this: a = int(input()) num_list = list(str(a)) num_list_2 = map(int, num_list) print(num_list_2) But when I tried the print statement, I got an output of: <map object at 0x7f1174cd6390> What does this even mean? It's not even a syntax error. Does anyone know another way to turn the string list into an integer list? Please help.
3
posted by FARHEENPALAGIRI (2) about 17 hours ago
1
Too Many Questions.
**Question 1:** This Syntax Error is irritating me because I have no idea how to fix it. On this repl: https://repl.it/@HarperframeInc/BoredBot **Question 2:** How do I record a gif? **Question 3:** Is it possible to buy upvotes/cycles?
2
posted by HarperframeInc (13) about 18 hours ago
2
What are the capabilities of what I can do with Python and how do I further my understanding?
# Background So far, at school, we've been learning python with Turtle, but I've seen also people do so much stuff on regular python. I want to do something a bit more advanced and start to makes some bigger projects, most preferably on regular python. Does anyone know how to do this? On python I basically have got through 50% of the Codecademy course, and know how to do maths and other basic functions like ``` x=2 if x%0==0: print("Even") else: print("Odd") ``` However, this feels quite basic and I would like to push my understanding on further! Does anybody have any suggestions, or maybe give me an idea for a project I could make where I could possibly pick up a bit of python. Codecademy is OK, but like many , I prefer to learn by practically implementing skills. ##### Thank you. ###### John_WardWard :)
11
posted by John_WardWard (61) 14 days ago
1
Weird error...idk how to explain
https://repl.it/@Victor_Suarez/WordlistShaver So apparently it reads the word list and dies? I've never come across this error, wondering if someone has come across such an error and how y'all bypassed it. Thanks in advance!
12
posted by Victor_Suarez (13) 15 days ago
1
I need help
Hi everyone. Me again. I need help with a program I'm working on (as usual). So in this code there are two numbers inputted. If exactly one is negative, the program should print YES. If anything else is the input, the program should print NO. So I wrote this: a = int(input()) b = int(input()) if a < 0: print("YES") elif b < 0: print("YES") elif a < 0 and b < 0: print("NO") else: print("NO") The computer seems to be ignoring the command of if both numbers are less than 0. Every time I input two number, the computer outputs YES instead of NO. How do I make it not do that? Help me please??
2
posted by FARHEENPALAGIRI (2) about 19 hours ago
14
Repl talk
I wonder why Repl talk isn't called "Reply". A perfect opportunity for a play on words.
7
posted by ChandlerMorell (56) about 2 months ago
2
Website Check
I recently made this website: https://repl.it/@frdobagins/GTAEG And I was wondering if anyone would be willing to look though it and tell me what I could've done better in places. I probably messed up a lot, only 3 months into learning html and css.
7
posted by frdobagins (12) 9 days ago
2
download single files
My python script outputs a .txt file... I want to download just the .txt file. Is there a way to do this? I only get the "download as zip". But I only need the one file (and I dont always have have zip opener ready on the pc -depends where I am). I know I can just copy/paste the content of the .txt. -but that is extra clicks/time wasted.
2
posted by WikingGaffa (10) 3 days ago
2
Please add Clojurescript!
Great to have Clojure, but please add Clojurescript as well.
4
posted by DavidPlumpton (1) 7 days ago
8
Can I get back on the leaderboard?
### amasad kicked me off I would like some cycles to get back on, so if anybody cares to upvote. :)
13
posted by fullern000 (671) about 1 month ago
9
Best resources for learning how to code?
It's no secret that repl.it is a destination for a lot of new programmers or learners. Many of them ask us for recommendations for the best resources to learn how to code. Be it tutorials, videos, courses, etc. We're trying to build the Learn board to become a destination for people to find coding content. In the meantime I'm putting the question to the community: what's the best resources that helped you learn?
12
posted by amasad (646) about 2 months ago
1
Can't seem to run multiple python files in one project
I have two .py files in my project. The first file, main.py ran 100% fine. I added a second file, hell.py, which only has print('hello') in it. When I switch the file viewer to hell.py, clicked run, and the console only displays the output of main.py, but does not display 'hello'. Why can't I get 'hello' to show up?
4
posted by sodalover (0) 4 days ago
1
python struggle
Don't understand why it doesn't work. It should work. Can somebody help me?
3
posted by YannicHamers (0) 1 day ago
7
Add a title
If related to your code, please include a link to your code. Please try to be as specific as possible with the questions.
1
posted by aliloua (6) 20 days ago
3
Repl
So, does Repl stand for anything? What does it mean?
5
posted by ChandlerMorell (56) 12 days ago
5
How to learn Rust?
I would like to learn rust programming language but doesn't know where to start. I would like to have some ideas about it. I am reading the book right now but it has too much info to cover in on go.
6
posted by Brawn (4) 27 days ago
1
My discord bot on repl won't start: unable to start repl process
Today I started experiencing Discord Bot issues - My repl just won't start. The code itself is fine, I know that 100%, I think this error is on repl's side. What should I do? https://repl.it/@DanielSykora/DriftBot-for-Discord is the code.
2
posted by DanielSykora (0) 1 day ago
4
Will I get banned for my new profile pic?
(For the repl team).
8
posted by HarveyH (50) 29 days ago
7
Who is your favorite YouTube influencer?
There are so many different YouTube channels and influencers, I don't know who to follow.
6
posted by hayaodeh (53) about 1 month ago
44
Collaborative programming
Will it ever be possible to have multiple people coding on the same repl at the same time? I know ,for me, this is repl's biggest drawback. Will this ever happen?
14
posted by LifeIsOverrated (57) 6 months ago
Load more