Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (Retired) Ins & Outs Ins & Outs

fix the shitcode please)

The task is to create a variable named name with your name in it.

name.py
name = input("name")
if name == "roman":
  print("{}.format(name))

2 Answers

Ryan Ruscett
Ryan Ruscett
23,309 Points

Hola,

Well, I mean lol

name = input("name"

That is actually asking for command line input. It will prompt you for name and you enter it. Whatever you enter will be saved as name.

To declare a variable named "name". You just do it like this.

name = "Ryan"

That's it. There is no need to print it. That will get you passed step 1. Step 2 says create a variable treehouse and combine two strings. Witch there are really two ways to do this.

one = "Tree"
two -="house"

Treehouse = one + two

#Or use string literals

Treehouse = "Tree" + "house"

Let me know if that helps you out or if you have other questions. I would be happy to answer them for you.

Change print("{}.format(name)) to print("{}.format(name)")