Python Python Basics Meet Python Using Input

how to do the last tasks

so i'm at the end and i learned about the variables and I don't know what's wrong with my code

using_input.py
favorite_color= input("whats your favorite color") the =r [USER INPUTED COLOR] is a great color!")
input ("whats your favoritprint ")

1 Answer

Hmm, not sure what you're trying to do with the first line and why you have input() twice.

favorite_color will have the value of the user input. To insert it into the statement "That color [user inputted color] is a great color!" you need to use the string format() method on it. To print the whole thing, use print().

Example:

name = input("What is your name? ")
print("Hi {}!".format(name))