Within Coding User, our team of industry experts and professional coders cover all the tools you need to get coding. From those first few lines of code that will change your world forever to insider tips and tricks to advance your skills and programming abilities. Each issue features up-to-date user tutorials, put together in an easy to follow step-by-step manner, building to create a multi-volumed series that will see you get to grips with code but also improve your knowledge, job prospects, and expand your horizons. Let’s get coding, where the only limit is your own imagination. Subscribe today! 100% Independent! Please note: ALL free content and gifts are also available via this digital edition.
Coding USER
Using Modules
Calendar Module • Beyond the Time module, the Calendar module can produce some interesting results when executed within your code. It does far more than simply display the date in the Time module-like format, you can actually call up a wall calendar type display.
OS Module • The OS module allows you to interact directly with the built-in commands found in your operating system. Commands vary depending on the OS you’re running, as some will work with Windows whereas others will work with Linux and macOS.
Using the Math Module • One of the most used modules you will come across is the Math module. As we’ve mentioned previously in this book, mathematics is the backbone of programming and there’s an incredible number of uses the Math module can have in your code.
Random Module • The Random module is one you will likely come across many times in your Python programming lifetime; as the name suggests, it’s designed to create random numbers or letters. However, it’s not exactly random but it will suffice for most needs.
Tkinter Module • While running your code from the command line, or even in the Shell, is perfectly fine, Python is capable of so much more. The Tkinter module enables the programmer to set up a Graphical User Interface to interact with the user, and it’s surprisingly powerful too.
Pygame Module • We’ve had a brief look at the Pygame module already but there’s a lot more to it that needs exploring. Pygame was developed to help Python programmers create either graphical or text-based games.
Basic Animation • Python’s modules make it relatively easy to create shapes, or display graphics and animate them accordingly. Animation though, can be a tricky element to get right in code. There are many different ways of achieving the same end result and we’ll show you one such example here.
Create Your Own Modules • Large programs can be much easier to manage if you break them up into smaller parts and import the parts you need as modules. Learning to build your own modules also makes it easier to understand how they work.
Python in Focus: Artificial Intelligence • Artificial Intelligence (AI) and Machine Learning (ML) are the new hot topics of the IT industry. AI is fast becoming the working science fiction that it has been portrayed as in the past, and behind it is Python.
Code Repository
Python File Manager • This file manager program displays a list of options that allow you to read a file, write to a file, append to a file, delete a file, list the contents of a directory and much more. It’s remarkably easy to edit and insert into your own code, or add to.
Number Guessing Game • This is a simple little piece of code but it makes good use of the Random module, print and input, and a while loop. The number of guesses can be increased from 5 and the random number range can easily be altered too.
Random Number Generator • User input and the ability to manipulate that input are important elements with any programming language. It’s what separates a good program from a great program, one that allows the user to...