Beginner's coding bug [Help needed]

This is the place for queries that don't fit in any of the other categories.

Beginner's coding bug [Help needed]

Postby Caperr » Fri Sep 13, 2013 4:58 pm

Hi, i am a beginner at python, and i decided to make an interactive chat within IDLE.
It's pretty simple. You type 0 for a positive answer, 1 for a negative one. I crushed a ton of bugs and it seems to be working perfectly, apart from 1 problem.
You can not answer negatively to the fifth question(When the CPU is talking about homework). I have searched in my coding and found nothing.
The correct code is there, and is in the correct column relative to the input, but the system just seems to disregard it.
Any help would be greatly appreciated.
Thanks -Caperr

Before i forget, here is a download link for my code:
Last edited by micseydel on Fri Sep 13, 2013 8:52 pm, edited 1 time in total.
Reason: First post lock. Attempted to add code from link... but it was too much.
Posts: 2
Joined: Fri Sep 13, 2013 4:24 pm

Re: Beginner's coding bug [Help needed]

Postby micseydel » Fri Sep 13, 2013 9:05 pm

That is way too much code. You need to learn functions and loops.

That aside, your question could be vastly improved. You should be able to post 10 or less lines of code to reproduce most problems. In any case, I'm sure you could do so in less than 8k. Also, you should tell us exactly what input is required for your program, exactly what output you get, and exactly what output you want. Better yet, hard code the input so that if we want to test your program, we don't have to give it input.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Beginner's coding bug [Help needed]

Postby Caperr » Sat Sep 14, 2013 12:22 pm

Thanks, i will begin on them as soon as possible, as i say i am a beginner. In fact, googling functions and loops suggests that this and redesigning my system could not only make it more compact, but also fix my problem. I will start again and post again(with less code, and hard coded) if i continue having this problem. Thank you for your help.
Posts: 2
Joined: Fri Sep 13, 2013 4:24 pm

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 10 guests