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 I/O

in using python to outupt something to the screen use what ........function?

the print() and input() functions are wrong what is next?

2 Answers

Keerthi Suria Kumar Arumugam
Keerthi Suria Kumar Arumugam
4,585 Points

The print() function should work fine. Refer the code below

print("This should appear on your screen")

string = "Hi TreeHouse"
print(string)

Hey so you use the print function to print something to the screen, like:
print("Thomas Covington")

This would be Thomas Covington on the screen

You use the input method to get Data from the person using your program, like: food = input("What is your favorite food?")

The program would ask the user for his / her favorite food and the word (the favorite food of the user) would be stored in the food variable.

I hope I helped you! I would be happy if you mark my answers as "best answer" :) Have a nice day.