From the course: Transition from C# to Python
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Challenge: Language constructs
From the course: Transition from C# to Python
Challenge: Language constructs
(upbeat music) - [Instructor] All right, let's take what we've learned so far and try out a simple coding challenge. We're going to take a C# program and convert it to Python. So here in the challenge folder, let's open up the C# code, and this is the C# version of the app, and it's just a simple program to keep track of a running tally of numbers that the user enters. So you can see that when the program starts, we have a loop, and the program reads the input from the user. If the user types the word quit, then the application exits. Otherwise, if they enter a number, then we add that number to the running total and then print out the running total. So we keep on doing that until the user exits the programs. So let's go ahead over to the terminal, and here in chapter one, I'm going to go into my challenge folder. All right, and let's go into ChallengeCS and let's do dotnet run. All right, so we've got running tally…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.