1.11M Members

chaning an input color

 
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)

 
0
 

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

 
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)

 
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.

 
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.

 
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.

 
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.

 
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.

 
0
 

I feel that you may possibly be misinterpreting the assignment.

 
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 six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: