![]() Step 1: Set up the project and create a function that takes in an the number of seconds we want to count down for. Calculate the amount of time remaining and print out the timer.Use a while loop so that we keep counting down until t is 0.Set up the project and create a function that takes in an the number of seconds we want to count down for.For example, 10 % 3 = 1, because 3 goes into 10 three times, with a remainder of 1. It returns the remainder of dividing the left hand operand by right hand operand. The % symbol is called the modulo operator. Remember that floor division in Python returns the quotient, but rounds down to the nearest integer. You can also view my project solution code if you get stuck. Watch the video, or click run to see the project yourself! This project is estimated to take you about 15-30 minutes, but you should move faster or slower at your own pace! Project Demoīefore getting started, see how our finished project works for reference. Some other projects you can try first for more practice with beginner/intermediate Python are our how to make a calculator in Python and draw an animal face in Python tutorials.įor learning outcomes, you'll get a lot of practice with user input, while loops, modulo, Python time module, and floor div. ![]() You should review Python loops, strings, inputs, and conditionals beforehand to get the most out of this project. ![]() This beginner/intermediate Python tutorial is for students that want a Easy challenge project, about 10-15 lines of code for countdown timer, and 20-30 lines of code long for the pomodoro timer. This project falls under our Juni Python Level 2 coding class for kids. This project info and learning outcomes summary will help you decide if this Python coding project is right for you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |