ZAMYLA CHAN: It's me, Zamyla. This time, in Python. We're going to recreate the Mario problem that we did before, giving Mario a full pyramid to jump over. We start by prompting and validating the user input. The logic stays the same as before when we did it in C. In C we used the get, int function and hashtag included the cs50 library. This time, we'll use the get, int function in Python and import cs50. In C, to validate the user input, we used a do, while loop. Now in Python, Python doesn't have a do, while loop. But we can modify the while loop in Python in order to mimic what the do, while loop was giving us. Here I have a while loop in Python. Notice that the first condition for this while loop is true. What this does is it guarantees that I execute this loop at least once. And what I'm going to do is prompt the user within that loop. Next, I have this if condition. If the condition evaluates to true, then the break will be executed. And the break will quite literally break me out of that loop and then I'll progress to the code underneath it. So what this snippet of code does is prompts the user at least once. And then if the condition is met, will exit the loop. Recall back in C, we had to use compound conditional expressions in order to evaluate whether or not the user's input was valid. Instead of using characters for or and and, in Python, we can simply use words. In terms of printing or drawing the pyramid, the logic stays the same. For every row in the pyramid we'll want to print the left pyramid consisting of the spaces and the hashes, print the gap, two spaces, and print the right pyramid, the hashes for that. Let's talk about printing in Python. By default, Python will print something followed by a new line. So if you want to avoid printing a new line after your string, you'll have to add in another argument to the print function, end equals and two quotation marks. Now say you want to print something 50 times. Then I would pass in my string followed by a star for a multiplication and the number 50. Finally, if I want to print a new line, then all I have to do is call print without passing in any arguments. With that, you've completed Mario's pyramid. And he can jump over it once again. My name is Zamyla and this was Mario.