探索我的图书馆
searchclose
shopping_cart_outlined
exit_to_app
category_outlined / 技术与游戏
Coding Academy 2015Coding Academy 2015

Coding Academy 2015

Tech Guru Guide: Coding Academy 2016

Learn to code from scratch or improve your skills in languages like Python, Swift and beyond!

国家:
United Kingdom
语言:
English
出版商:
Future Publishing Ltd
Read Morekeyboard_arrow_down
购买期刊
¥51.88

本期

access_time2 min.
welcome!

Programming is more than just a hobby, or a job, or a means to an end. Programming has helped me transform my brain. It’s brought out inner logic and organisation, it’s made me more rational and efficient and, since first picking it up at a very early age, it’s given me a tendency to think in IF...THEN arguments. Don’t judge me, I can’t help it.Whether you’re a dyed-in-the-wool coding type or a beginner hoping to get started and produce your first programming projects, there should be something for you in Coding Academy 2016. We’ve consulted with a host of respected experts in its construction, and forced them to use language (and languages) understandable by mere mortals in their approach. We concentrate mainly on Python, that most human-readable of languages, to…

access_time6 min.
different types of python data

While we’re looking only at basic data types, in real programs getting the wrong type can cause problems, in which case you’ll see a TypeError.In this section, we’ll be using Python to broach many of the fundamental concepts of coding. Here we look at basic data types; in later articles, we’ll look at a few more advanced topics that build on what we do here: data abstraction, fancy structures such as trees, and more.What is data?In the world, and in the programs that we’ll write, there’s an amazing variety of different types of data. In a mortgage calculator, for example, the value of the mortgage, the interest rate and the term of the loan are all types of data; in a shopping list program, there are all the different types…

access_time7 min.
more python data types

In the previous tutorial, we introduced Python’s most common data types: numbers (ints and floats), strings, lists, tuples and dictionaries. We demonstrated how they work with different operators, and explained a few of their most useful methods. We didn’t, however, give much insight into how they might be used in real situations. In this article, we’re going to fix that.We’re going to write a program that counts the number of times each unique word occurs in a text file. Punctuation marks will be excluded, and if the same word occurs but in different cases (for example, the and The), they will be taken to represent a single word. Finally, the program will print the results to the screen. It should look like this:As an example, we’ll be using The Time…

access_time6 min.
reliability by abstraction

In the previous few tutorials, we have been looking at data. First, we introduced some of Python’s core data types, and then we demonstrated how they can be put to use when solving a real problem. The next data-related topic we want to consider is abstraction, but before we get on to that, we’re first going to look at abstraction – both in general and as it applies to procedures. So, this time we’ll take a brief hiatus from data, before returning to it in a later article.Square rootsTo get our heads around the concept of abstraction, let’s start by thinking about square roots and different techniques for finding them. One of these was discovered by Newton, and is thus known as Newton’s method.Newton’s method states that when trying to…

access_time8 min.
files and modules done quickly

When you read a file, most languages will step through its data from the beginning to the end in chunks you specify. In this example, we’re reading a line at a time.“If the filesystem knows the file is being changed, it won’t allow access”For the majority of programming projects, you don’t get far before facing the age-old problem of how to get data into and out of your application. Whether it’s using punched cards to get patterns into a 19th century Jacquard textile loom, or Google’s bots skimming websites for data to feed its search engine, dealing with external input is as fundamental as programming itself.And it’s a problem and a concept that you may be more familiar with on the Linux command line. When you type ls to list…

access_time6 min.
write your own unix program

The final program we’ll be implementing. It’s not long, but it makes use of a lot of core language features you’ll be able to re-use time and again.“You now know more than enough to start writing real programs”In the next few pages, that’s what we’re aiming to do: get you writing real programs. Over the next few tutorials, we’re going to create a Python implementation of the popular Unix tool cat. Like all Unix tools, cat is a great target because it’s small and focused on a single task, while using different operating system features, including accessing files, pipes and so on.This means it won’t take too long to complete, but will also expose you to a selection of Python’s core features in the Standard Library, and once you’ve mastered…

help