1,105,340 Community Members

chaning an input color

Member Avatar
RoqueyB
Newbie Poster
13 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

i am new to python and am working on a simple code for a project.
I am to end up with and output that says: "Please enter your name: Bubba"
I am to use

name = input("Please enter your name:")

However, when I input the name "Bubba" the project says it should end up being red. However when I run the program it ends up blue just like the "please enter our name" string.

I'm sure I'm missing something simple but I do not know what it is. Help?!

Oh and I am using Python 3.2.2 (i that has anything to do with it)

Member Avatar
pyguy62
Posting Whiz
346 posts since Aug 2011
Reputation Points: 23 [?]
Q&As Helped to Solve: 19 [?]
Skill Endorsements: 0 [?]
 
0
 

are you suppose to be using a tkinter window to display the output?

Member Avatar
RoqueyB
Newbie Poster
13 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I'm supposed to run it in the idle window but write it in another empty window.
I just started learning python last week so i dont know about tkinter windows. (sorry, i dont know names of everything yet)

Member Avatar
pyguy62
Posting Whiz
346 posts since Aug 2011
Reputation Points: 23 [?]
Q&As Helped to Solve: 19 [?]
Skill Endorsements: 0 [?]
 
0
 

I don't understand why they would want you to do that...http://mail.python.org/pipermail/tutor/2005-August/040327.html

Member Avatar
RoqueyB
Newbie Poster
13 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Sorry, what I meant was I run it in IDLE to make sure it works and upload the .py to a site

and the fact that error messages are red is what confused me too when they said it needed to be in red.

this is exactly what the project says: Prompt the user for a name like this:

name = input("Please enter your name: ")

Input is shown in red.

Member Avatar
pyguy62
Posting Whiz
346 posts since Aug 2011
Reputation Points: 23 [?]
Q&As Helped to Solve: 19 [?]
Skill Endorsements: 0 [?]
 
0
 

If you could post the exact assignment that might clear things up, I'm just having 2 issues with this: 1,Posting python to a site isn't really a "beginner" project, 2, Making the output color in IDLE change isn't something that's common practice.

Member Avatar
RoqueyB
Newbie Poster
13 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

that was the exact assignment. I am uploading it to athene. its for a class, and I have it working except for the fact that the input ("Bubba") is not red. Therefore I'm not getting the assignment correct.

Member Avatar
snippsat
Veteran Poster
1,041 posts since Aug 2008
Reputation Points: 483 [?]
Q&As Helped to Solve: 382 [?]
Skill Endorsements: 10 [?]
 
0
 

However when I run the program it ends up blue just like the "please enter our name" string.

Blue is correct,red comes if you make an error.
This is how it should be and has always been in IDLE.
You can try to change that color option->configure IDLE.
But that is just stuid,so leave alone.

Member Avatar
pyTony
pyMod
6,103 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
0
 

Is input shown in the assignment red? i think you have other problem, but as you do not post your complete code, we can not know what.

Member Avatar
pyguy62
Posting Whiz
346 posts since Aug 2011
Reputation Points: 23 [?]
Q&As Helped to Solve: 19 [?]
Skill Endorsements: 0 [?]
 
0
 

I feel that you may possibly be misinterpreting the assignment.

Member Avatar
RoqueyB
Newbie Poster
13 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Yes i figured it out,
I was doing it right it was just the site was very picky and i forgot a space or something after saying "Please enter your name: "
Thank you guys though.
Sorry, if I wasted your time. I knew it was something simple I was missing but I didnt think it was that stupid!

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: