Full overview
This chapter starts by showing why Python is considered by many to be the best language for teaching beginners how to program. Next, this chapter presents the concepts and terms that you need to know before you start programming. Then, it shows how to use an integrated development environment (IDE) called IDLE to develop and test Python programs.
The quickest and best way to learn Python programming is to do Python programming. That’s why this chapter shows you how to write complete Python programs that get input, process it, and display output. When you finish this chapter, you’ll have the skills for writing comparable programs of your own.
Like all programming languages, Python provides control statements that let you control the execution of a program. These statements include if statements as well as looping statements. Before you can learn how to use these statements, though, you need to learn how to code Boolean expressions
In chapter 2, you learned how to use some of Python’s built-in functions, such as the print() and input() functions. In this chapter, you’ll learn how to define and use your own functions. You’ll also learn how to store your functions in modules and how to use modules that have been created by others.
If you’ve been doing the exercises and writing your own programs, you already have some experience with testing and debugging. Now, this chapter reviews some of what you’ve been experiencing and presents some new skills for testing and debugging. As your programs become more complicated, these testing and debugging skills become more valuable.
So far, you have learned how to work with variables that store a single item of data such as a number or a string. However, in programming, you often need to store a collection of data items. For example, you might need to store a collection of strings or a collection of numbers. This chapter teaches you how to work with two of Python’s data structures for collections: lists and tuples.
So far in this book, you’ve learned how to work with data in the main memory of your computer. But when the program ends, that data is lost. Now, you’ll learn how to save that data in a file and how to read that data from the file. This is known as file input and output, or file I/O.
In chapter 1, you were introduced to exceptions. By now, you have most likely experienced many of them as you developed and tested your programs. In this chapter, you will learn how to handle exceptions so your programs don’t crash when an exception occurs
In previous chapters, you learned the basics of working with numbers, including how to initialize numeric variables, how to use arithmetic expressions, and how to compare numeric values. In this chapter, you’ll learn more about working with numbers, including how to format them and how to avoid floating-point errors by using decimal numbers.
In chapter 2, you learned some basic skills for working with strings, including how to create a string, how to concatenate strings, and how to work with escape characters. Now, in this chapter, you’ll expand that set of skills.
In the last two chapters, you learned how to work with two of the essential data types: numbers and strings. Now, you’ll learn how to work with a third essential type: dates and times. These skills are important because you use dates and times in most applications, from business applications to games.
NOTE: While cellular hotspots may allow access to our courses, users may experience connectivity issues by trying to access our learning management system. This is due to the potential high download and upload latency of cellular connections. Therefore, it is not recommended that students use a cellular hotspot as their primary way of accessing their courses.
NOTE: While we understand that our courses can be viewed on Android and iPhone devices, we do not recommend the use of these devices for our courses. The size of these devices do not provide a good learning environment for students taking online or live online based courses.
Included programs
- Use IDLE to test Python expressions and statements in the interactive shell.
- Code, test, and debug programs
- Use pseudocode to plan your control structures and programs
- Define and use functions, default values, named arguments, local variables, and global variables
- Plan the test runs for a program
- Use lists and tuples in your programs
- Use text, CSV, or binary files to save and retrieve data
- Add the proper level of exception handling
- Code, test, and debug programs that work with numbers
- Code, test, and debug programs that work with strings
- Code, test, and debug programs that work with dates and times
Materials
All necessary course materials are included.
System requirements
Minimum technical expectations for the online learning environment. Your IT team can use this as a checklist.
Internet connectivity
Internet Connectivity Requirements: Cable, Fiber, DSL, or LEO Satellite (i.e. Starlink) internet with speeds of at least 10mb/sec download and 5mb/sec upload are recommended for the best experience. Cable, Fiber, DSL, or LEO Satellite (i.e. Starlink) internet with speeds of at least 10mb/sec download and 5mb/sec upload are recommended for the best experience. Cable, Fiber, DSL, or LEO Satellite (i.e. Starlink) internet with speeds of at least 10mb/sec download and 5mb/sec upload are recommended for the best experience.
While cellular hotspots may allow access to our courses, users may experience connectivity issues by trying to access our learning management system. This is due to the potential high download and upload latency of cellular connections. Therefore, it is not recommended that students use a cellular hotspot as their primary way of accessing their courses.
Hardware
Hardware Requirements: CPU: 1 GHz or higher RAM: 4 GB or higher Resolution: 1280 x 720 or higher. 1920x1080 resolution is recommended for the best experience. Speakers / Headphones Microphone for Webinar or Live Online sessions. CPU: 1 GHz or higher RAM: 4 GB or higher Resolution: 1280 x 720 or higher. 1920x1080 resolution is recommended for the best experience. Speakers / Headphones Microphone for Webinar or Live Online sessions. CPU: 1 GHz or higher RAM: 4 GB or higher Resolution: 1280 x 720 or higher. 1920x1080 resolution is recommended for the best experience. Speakers / Headphones Microphone for Webinar or Live Online sessions.
Operating system
Operating System Requirements: Windows 7 or higher. Mac OSX 10 or higher. Latest Chrome OS Latest Linux Distributions Windows 7 or higher. Mac OSX 10 or higher. Latest Chrome OS Latest Linux Distributions Windows 7 or higher. Mac OSX 10 or higher. Latest Chrome OS Latest Linux Distributions
While we understand that our courses can be viewed on Android and iPhone devices, we do not recommend the use of these devices for our courses. The size of these devices do not provide a good learning environment for students taking online or live online based courses.
Web browser
Web Browser Requirements: Latest Google Chrome is recommended for the best experience. Latest Mozilla FireFox Latest Microsoft Edge Latest Apple Safari Latest Google Chrome is recommended for the best experience. Latest Mozilla FireFox Latest Microsoft Edge Latest Apple Safari Latest Google Chrome is recommended for the best experience. Latest Mozilla FireFox Latest Microsoft Edge Latest Apple Safari
Recommended software
Basic Software Requirements (These are recommendations of software to use): Office suite software (Microsoft Office, OpenOffice, or LibreOffice) PDF reader program (Adobe Reader, FoxIt) Courses may require other software that is described in the above course outline. Office suite software (Microsoft Office, OpenOffice, or LibreOffice) PDF reader program (Adobe Reader, FoxIt) Courses may require other software that is described in the above course outline. Office suite software (Microsoft Office, OpenOffice, or LibreOffice) PDF reader program (Adobe Reader, FoxIt) Courses may require other software that is described in the above course outline. ** The course outlines displayed on this website are subject to change at any time without prior notice. ** ** The course outlines displayed on this website are subject to change at any time without prior notice. **
Ready for a team proposal?