Python Python Basics Meet Python Using Input

Marian Mwendamberi
Marian Mwendamberi
73 Points

using_input.py

where am i going wrong

using_input.py
favorite_color=input("the color{favorate_color} is a great color!")

2 Answers

Maxwell Newberry
Maxwell Newberry
Front End Web Development Techdegree Student 7,675 Points

Make sure you're copying the content exactly as the challenge describes.

For example, in this challenge, make sure your prompt (input) says

favorite_color = input("What is your favorite color? ")

Then, for the second task, if you want to concatenate the inputted text, you can do so using the concatenation symbol in Python, which is + (plus sign).

print("The color " + favorite_color + " is a great color!")

Or, doing the approach (I think) you're going with in using the format() method:

print("The color {} is a great color!".format(favorite_color))

Good luck!

Carmine Lentini
Carmine Lentini
3,711 Points

As Maxwell as already suggested you should not put anything within the curly braces. Instead, consider using .format()