Python Console I/O: Reading & Writing
Interactive applications communicate with users. Console.WriteLine() prints a line and advances the cursor, Console.Write() prints without a newline, and Console.ReadLine() captures user keyboard text. To convert text into numbers, use Convert.ToInt32() or int.Parse().
"Console.WriteLine() is like sending a text message and hitting send. Console.Write() is typing letters without hitting send. Console.ReadLine() is waiting for the user to type a reply and press Enter."
Deep Dive: How It Works
Console.WriteLine(text): Prints text with an automatic trailing newline.
Console.Write(text): Prints text without advancing to the next line (perfect for input prompts: Console.Write("Enter name: ");).
Console.ReadLine(): Reads a full line of text entered by the user as a string.
Type Parsing: Console.ReadLine() always returns a string. To convert to an int: int age = int.Parse(Console.ReadLine()); or int age = Convert.ToInt32(Console.ReadLine());.
Syntax Blueprint
Console.Write("Enter name: ");
string name = Console.ReadLine();
Console.WriteLine("Hello, " + name);Prompt with Write(), capture with ReadLine(), echo with WriteLine().
Core Rules to Remember



Common Beginner Traps & How to Fix Them
Trying to assign ReadLine directly to an int: int age = Console.ReadLine();Why it happens: Expecting automatic type casting.
How to fix: Wrap in int.Parse(): int age = int.Parse(Console.ReadLine());.
Live Interactive Example
Hit Run Code to see it liveYour Turn: Micro Challenge
No pressure! Edit the starter code below and test your solution with instant feedback.
Parse string to integer
Declare string inputScore = "85";
Parse it into int score = int.Parse(inputScore);
Print "Final Score: 85".
Finished reading and practicing?
Mark this lesson as completed to update your course progress.