Learn Python Visually Ivelin Demirov download
Learn Python Visually Ivelin Demirov download
https://ebookbell.com/product/learn-python-visually-ivelin-
demirov-5902968
https://ebookbell.com/product/learn-python-visually-creative-coding-
with-processingpy-1st-edition-tristan-bunn-23885702
Iot Data Analytics Using Python Learn How To Use Python To Collect
Analyze And Visualize Iot Data M S Hariharan
https://ebookbell.com/product/iot-data-analytics-using-python-learn-
how-to-use-python-to-collect-analyze-and-visualize-iot-data-m-s-
hariharan-53637720
https://ebookbell.com/product/handson-matplotlib-learn-plotting-and-
visualizations-with-python-3-1st-ed-ashwin-pajankar-36429162
https://ebookbell.com/product/phython-programming-workbook-for-data-
science-an-essential-beginners-guide-to-learn-how-to-become-a-data-
analysist-and-visualizer-french-58268242
Learn Python 3 The Hard Way A Very Simple Introduction To The
Terrifyingly Beautiful World Of Computers And Code Pdfdrivecom Zed A
Shaw
https://ebookbell.com/product/learn-python-3-the-hard-way-a-very-
simple-introduction-to-the-terrifyingly-beautiful-world-of-computers-
and-code-pdfdrivecom-zed-a-shaw-50384078
https://ebookbell.com/product/learn-python-generative-ai-journey-from-
autoencoders-to-transformers-to-large-language-models-zonunfeli-
ralte-56143526
Learn Python The Hard Way 5th Edition 5th Edition Zed A Shaw
https://ebookbell.com/product/learn-python-the-hard-way-5th-
edition-5th-edition-zed-a-shaw-56693076
https://ebookbell.com/product/learn-python-in-7-days-begin-your-
journey-with-python-mohit-20009880
https://ebookbell.com/product/learn-python-programming-a-beginners-
guide-to-learning-the-fundamentals-of-python-language-to-write-
efficient-highquality-code-2nd-edition-fabrizio-romano-romano-33296430
*********************
********************
Thank You! *********************
A book takes many people working together to make it a reality. So, to all the Kickstarter backers that helped me complete
this project I wish to express a big ‘Thank You’ and I hope we can do more great things in the future.
********************
Credits & Legal *********************
AUTHOR
Ivelin Demirov
EDITORS
Anton Berezin
Beth McMillan
Page design
Jordan Milev
ILLUSTRATOR
Ivelin Demirov
PROOFREADER
Beth McMillan
ACKNOWLEDGMENT
I must acknowledge the help of the online Python community, who have toiled in the background for many years to help
make Python the exciting programming language it has become
COPYRIGHT
©2015 Ivelin Demirov
NOTICE OF RIGHTS
All rights reserved. No part of this book may be reproduced in any form, by any means without the written permission of
the publisher or the author.
TRADEMARKS
All trademarks are held by their respective owners.
NOTICE OF LIABILITY
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in
the preparation of the book, neither the author nor the publisher shall have any liability to any person or entity with respect
to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by
the computer software and hardware products described in it.
PAPERBACK ISBN
ISBN-13: 978-1507727072
ISBN-10: 1507727070
CONTACTS
pythonvisually.com
********************
Contents *********************
Thank You!
Credits & Legal
About this book
Why Python?
Installation
Hello World!
Terminal way
Scripting Way
Variables
Data types
Basic Math
Operators precedence
String operations
Slicing
Concatenation
Comments
Multi-line Comments
Functions
Basic functions
Functions with parameters
Default values
Return values
If/Else and conditional statements
********************
Boolean expressions
Alternative branches *********************
********************
About this book *********************
THE PROBLEM
People cannot be blamed for thinking programming is hard when trying it out for the first time. Learning to program is like
learning a new language.
A number of rules and grammar syntax guidelines exist to follow. It also requires memorizing a bevy of glossary terms for
each language, and unless a person works with programming at least 8 hours a day, the person is unlikely to become very
familiar with programming quickly; at least, that has been the situation for years until now.
THE METHODOLOGY
Our approach involves teaching programming concepts via simple illustrations.
The visual approach works because it is one of the most fundamental ways of learning. Everyone as a baby and toddler
learns the world around them via sight and sound long before there is comprehension associated with letters and
meanings.
Programming works in modules and building blocks. As a person learns a few basic modules and steps, he can then learn
to build more complex modules on those first basic units.
It’s a building block approach where bigger structures can be coded once the basic modules are mastered. I start with a
set of basic building blocks that are easy to learn through illustrations and metaphors.
From there, a user can apply multiple variations and build further. However, the initial set of building blocks becomes a
Rosetta stone of sorts, allowing a user to program and build in any situation going forward.
********************
Why Python? *********************
When you embark on your computer science journey at college, you’ll probably start by
learning Python.
So why choose Python over any other programming language?
It’s simple:
********************
Installation *********************
There are pre-compiled packages made for easy installation on multiple operating
systems such as Windows, Linux, UNIX and Mac OS to name but a few.
If you head over to https://www.python.org/downloads/ you can select the right
installation method for your operating system. Most Linux systems come with Python pre-
installed.
Version 3 of Python is used in this book.
In Windows, once you have installed Python, select Python IDLE or Python command
line/console from the Start menu or screen.
The difference between the IDLE and the console is that the IDLE has a graphical
interface, which looks similar to a text editor. In Linux, UNIX, and OS X, you can launch
Python emulator from command line by typing Python.
To choose a specific version of Python type PythonX where X is the version number (e.g.
“Python3” for version 3).
********************
Hello World! *********************
Most of the time that you write Python code, you will be writing the script in the IDLE or
any other IDE like Eclipse or rich text editor like Sublime text or Notepad++. However,
you can use the Python interpreter to write code interactively as it acts like a UNIX shell,
Even though it is possible to create programs using just the interpreter it is strongly
recommended not to do so since it is hard to save the code as a script for further reuse.
Rather consider the interpreter as an “on the fly” testing tool for your coding ideas.
Now lets make the interpreter output “Hello World!” string on the screen. Lets do it via
the interpreter.
********************
Terminal way *********************
Launch the interpreter from command line using Python command as it was described in
the previous chapter.
Type the following: print(“Hello world!”) and hit “Enter”.
The terminal shall look the following way:
In the code snippet above you can see that the first line starts with >>>.
This symbol indicates the line where you provide dynamic input to the interpreter. Notice,
as soon as the result of your first command was printed on the screen the interpreter
printed >>> again. Giving instructions to the interpreter is sequential. You give one
instruction - you wait till execution finishes, you enter another command and so on.
Note, further on in this book if you spot >>> symbol in a code snippet it shall mean that
you are expected to test the code in the interpreter yourself.
On the first line you entered a statement. The statement is nothing else but an
instruction for a computer to perform some task. The task could be anything from
make_a_coffee to launch_a_rocket. In your case it is a simple print function though.
Functions will be covered further in this book.
********************
Scripting Way *********************
One of the main principles of software engineering is reusability.
Let’s make the code that was just tested in the interpreter reusable.
To do so, create a file called “hello_world.py” and type the following text inside:
1. print(“Hello World!”)
What you placed into the file is exactly the line that was previously executed via the
interpreter.
Now lets execute the script that you wrote.
Open the command line, navigate to the location where the script resides and type the
following: python hello_world.py. After you hit enter you shall see that a “Hello World!”
text was placed on the screen.
Congratulations!
You’ve managed to write your first Python program and successfully launch it.
********************
*********************
********************
Exploring the Variety of Random
Documents with Different Content
and fled to Holland, where he became the centre of a party of his
fellow-countrymen who had also left their country because of their
political opinions. After this unjust attack on Argyle no one could be
sure of his liberty, and a scheme was got up for emigration to
Carolina. One Robert Ferguson was connected with this scheme. As
this man was concerned in an English plot against the life of the
King, called the Rye House Plot, all who had any dealings with him
were suspected of being art and part in that too, and were called to
account before the Council. Baillie of Jerviswood, a man much
beloved and respected, was tried on an accusation of conspiracy,
was found guilty, and put to death. His death greatly increased the
popular discontent.
47. James VII. 1685-1688. The Killing Time.—The death of
Charles and the accession of James rather made matters worse than
better for the people. Another defiance from the Cameronians, called
the Apologetical Declaration, was met by an Act which gave the
soldiers power at once to put to death anyone who would not take
the Abjuration Oath; that is, swear that they abhorred and
renounced this treasonable Declaration. A time of cruel slaughter
followed, in which Claverhouse was the chief persecutor. Many
heartrending tales are told of the sufferings of the poor creatures
whose fanaticism led them to persist in refusing to take this oath.
There is a story told that one John Brown, known as the "Christian
Carrier," a man of great repute among them, was shot dead by
Claverhouse himself, almost without warning, before the eyes of his
wife. At another time two women, Margaret Maclauchlan and
Margaret Wilson—one old, the other young—were, it is said, tied to
stakes on the Solway shore, that they might be drowned by inches
by the flowing tide. These tales and others of a like sort, bear
witness to the brutality of the one side and to the constancy of the
other. Early in James's reign an Act was passed by which attending a
Conventicle became a capital crime.
48. Argyle's Rising.—Monmouth was in Holland when his
father died, and many refugees from England and Scotland were
there with him. Among them they got up a scheme for placing him
on the throne in place of his uncle James, who was hated, while
Monmouth was very popular. To carry this out they planned a rising,
which was to have taken place at the same time in both kingdoms.
Argyle was to take the lead in Scotland, but he was subject to the
interference of a Committee chosen from among the others. The
Government was informed of this intended outbreak, and all the
clans that were known to be hostile to Argyle were roused against
him. Early in May he landed in Kintyre, and sent out the fiery cross
to summon his clansmen, who mustered to the number of 1800. But
the quarrels and the jealousy of the Committee placed over him
overthrew all his plans. By their advice he marched into the
Lowlands, where the people were little disposed to join him. The fort
where he had stored his arms and ammunition was seized by the
King's men. His men were starving. They deserted in large numbers,
and were at last dispersed by a false alarm as they were marching
on Glasgow. Argyle himself was taken while trying to escape. He was
still lying under the old sentence of death, which had been passed
against him for leasing-making. This sentence was executed without
any further trial, and with a repetition of all the indignities which had
been heaped upon Montrose. After his death the vengeance of the
Government fell on his clansmen. The country round Inverary was
wasted, while great numbers of the clan were transported to the
plantations, many of them having been first cruelly mutilated. At the
first alarm of the invasion a large body of prisoners for religious
opinion, of all ages and both sexes, had been sent to Dunnottar, a
strong castle on the coast of Kincardine, where they were so closely
crowded together in one dungeon that many died there. Most of the
survivors were also sent to the plantations.
49. The Indulgence.—Up to this time the Council had blindly
followed in the lead of the King. They would now do so no longer, as
they feared that he meant to restore the Roman Catholic Faith. The
Duke of Queensberry, the Commissioner, was deprived of his office,
and James Drummond, Earl of Perth, a convert to Romanism, was
placed in his stead. James next tried to get a Bill passed by which all
the penalties against the Roman Catholics should be done away,
while those against the Covenanters should remain in force. To this
Bill even the bishops objected, and James saw that there was
nothing for it but to treat all sects alike. He published several
Indulgences, but it was only the last, in 1688, that was full and
complete. It extended toleration to all, even to the Quakers, who
had up to this time been as much despised and persecuted as the
Covenanters.
50. Deposition of James.—This change of policy on the part of
the King had come too late. His attack on the liberties of the Church
in England had been resisted by seven of her bishops; and before
long his English subjects resolved to bear his tyranny no longer. They
invited his nephew and son-in-law, William, Prince of Orange, to
come to their aid. He came, and was by common consent invited to
mount the throne abdicated by James. When the news of William's
entry into London reached Edinburgh, a deputation, headed by
Hamilton, was sent to him, to pray him to call a Convention of the
Estates, and, till it met, to take the government of Scotland into his
own hands, Jan. 7th, 1689.
51. William and Mary, 1689-1702. The Convention. —
When the Convention met there was a large Whig majority. They
passed a resolution that James by his misgovernment had forfeited
the throne; they therefore deposed him, and offered the crown to
William and his wife Mary, the daughter of James, on the same
terms as had been made in England. The Convention then turned
itself into a Parliament, which went on to the end of the reign. The
members went in procession to the Cross of Edinburgh, where their
vote was read. William and Mary were then proclaimed; and the
ministers of parishes were ordered to pray publicly for the King and
Queen, on pain of being turned out of their livings. To the Claim of
Right, which was much the same as the English one, a special clause
was added, declaring prelacy to be an intolerable burthen which had
long been hateful to the people, and which ought to be swept away.
Three Commissioners were sent with the Instrument of Government
to London. Argyle administered the coronation oath; but William,
while taking it, declared that he would not become a persecutor in
support of any sect.
52. The Rabbling.—The fall of James was followed by the fall of
the Episcopal Church, which had made itself hateful to the greater
number of the people. They took the law into their own hands, and
on Christmas Day, 1688, a general attack was made on the curates
or parish priests in the Western Lowlands. About two hundred
curates with their families were at once driven out of their houses
with every sort of insult and abuse. William did not approve of these
excesses, but he had no means of putting a stop to them, for there
was no regiment north of the Tweed. He put forth a proclamation
ordering all persons to lay down their arms, but it was little heeded.
The rabbling and turning out went on much as before. If the bishops
would have taken the oaths, William would most likely have
protected them; but they remained true to their old master, and
shared his fall. For a time all was disorder. In some parishes the
curates went on ministering as heretofore, while in others the
Presbyterian divines held services in tents, or illegally occupied the
pulpits. It was not till June 1690 that the Presbyterian Church was
re-established by law. Sixty of the ministers who had been turned
out at the Restoration were still living, and to them was given
authority to visit all the parishes, and to turn out all those curates
whom they thought wanting in abilities, scandalous in morals, or
unsound in faith. Those livings from which the curates had been
rabbled and driven away were declared vacant. This way of dealing
with the Church gave offence both to the Episcopalians and to the
extreme Presbyterians, who did not approve of the interference of
the King in Church matters. Both these parties continued to look on
William and Mary as usurpers.
53. Dundee's Revolt.—When the Convention first met, each
party, Whigs and Jacobites alike, had dreaded an outbreak on the
part of the other. In the cellars of the city were hidden large
numbers of Covenanters, who had been brought up from the West
to overawe the Jacobites, while the Duke of Gordon held the Castle
for James, and he could, if he had so chosen, have turned the guns
upon the city. But the Jacobites, finding themselves in the minority,
determined to leave Edinburgh, and to hold a rival Convention at
Stirling; while it was agreed that the Marquess of Athole should
bring a body of his Highlanders to protect them. But this plan was so
ill concerted that Claverhouse, now Viscount Dundee, left hastily
before the others were ready, an alarm was given, and they were all
secured. Dundee withdrew to his own house in the Highlands, and
stayed there quietly for some time. But a few months later certain
letters written to him by James fell into the hands of the
Government, and an order was sent out for his arrest. Thus roused
to action, he summoned the clans for King James. Many of them
joined him, more from hatred of Argyle than from love for James.
General Mackay, who had come North with three regiments, was
sent against him; but he was not used to the Highland way of
fighting, and wasted some weeks in running about after an enemy
who always kept out of his way. Dundee had no regular troops, but,
as Montrose had done before him, he showed what good soldiers
the Celts can make with a good leader. As both Dundee and
Montrose were Lowlanders, they could not excite the jealousy of the
chiefs, and were all the better fitted for the supreme command of a
Celtic army. Each clan in such an army formed a regiment bound
together by a tie of common brotherhood, and all bound to live or
die for the colonel their chief; and so long as the clans could be kept
from quarrelling all went well. Dundee wrote to James, who was
now in Ireland, for help; but he only sent three hundred miserably-
equipped foot, under an officer named Canon. The hopes of the
Whigs were placed in Argyle and the western Covenanters, but
neither of these did all that was expected of them. Argyle could not,
because his country had been so lately wasted; and the Covenanters
would not, because the more part of them thought it a sin to fight
for a King who had not signed the Covenant. Some of them however
thought otherwise, and of these a regiment was raised, and placed
under the command of the Earl of Angus. This regiment was called
the Cameronians.
54. Battle of Killiecrankie.—The war now broke out again. It
was the great aim of each party to win over the adherents of Athole.
The Marquess himself, to keep out of harm's way, had gone to
England, and of those whom he had left to act for him some were
for James, others for the King and Queen. It was of importance to
both sides to secure the castle of Blair, which belonged to Athole,
and near there the two armies met, at Killiecrankie, a pass leading
into the Highlands. Here the Celts won a brilliant and decided
victory. The clansmen charged sword in hand down the pass with
such fury that they swept their foes before them; and Mackay, with a
few hundred men, all he could gather of his scattered army, was
forced to flee to Stirling, July 27, 1689. But this success had been
dearly bought by the death of Dundee. Thus left without a leader,
the victors thought more of plunder than pursuit; nor was there
anyone among them fitted to fill Dundee's place, and to follow up
the advantage he had won. Recruits came in, their numbers
increased, but this only made the disorder greater.
55. Attack on Dunkeld. Buchan's Attempt.—A month later
they attacked the Cameronian regiment stationed at Dunkeld. They
took the town at the first attack, but the soldiers defended
themselves in the church and in a house belonging to Athole in the
town with such spirit, that the Highlanders were driven back. They
blamed the Irish for the defeat, and the Irish blamed them, and the
end of it was that the clans dispersed, and Canon and his Irish
withdrew to Mull. In the spring of the next year the clans gathered
again, under an officer named Buchan, who came from James with a
commission to act as his commander-in-chief in Scotland. But they
were surprised and scattered in the strath of the Spey, by Sir William
Livingstone, who held Inverness for William. This action ended the
Civil War in Scotland, for Gordon had long since given up Edinburgh
Castle. To keep the western clans in order, Mackay built a fort in the
west of Invernesshire, which was called Fort William, in honour of
the King. The castle on the Bass, a rock in the Firth of Forth, was the
last place which held out for James, but the garrison were at last
obliged to give in, from want of food.
56. Reduction of the Highlands.—Still the chiefs did not take
the oaths to William, and were clearly only waiting for the
appearance of a new leader to break out again. To win them over to
the Government a large sum of money was put into the hands of
John Campbell, Earl of Breadalbane. He was accused of cheating
both the clans and the King by keeping a part of this sum himself,
and he never gave any clear account of what he had done with it. At
the same time a proclamation was put forth which offered pardon to
all the rebels who should take the oaths to William and Mary before
or on December 31, 1691. All who did not take advantage of this
offer were after that day to be dealt with as enemies and traitors,
and warlike preparations were made for carrying out the threat.
57. Massacre of Glencoe.—By the day named the clans had all
come in, except MacIan, chief of a tribe of MacDonalds, who lived in
Glencoe, a wild mountain valley in the northwestern corner of
Argyleshire. On the last day, December 31, MacIan and his principal
clansmen went to Fort William to take the oaths, but found that
there was no one there who had authority to administer them. There
was no magistrate nearer than Inverary, and, as the ground was
deeply covered with snow, it was some days before MacIan got
there. But the sheriff, in consideration of his goodwill and of the
delay that he had met with, administered the oaths, (January 6,)
and sent an account of the whole affair to the Privy Council at
Edinburgh. Unfortunately for Glencoe, Breadalbane was his bitter
personal enemy, and along with Sir John Dalrymple, the Master of
Stair, he determined on his destruction. An order for the extirpation
of the whole tribe was drawn up and presented to William, who
signed it, and it was carried out with cold-blooded treachery. A party
of soldiers, under the command of Campbell of Glenlyon, appeared
in the Glen. They gave out that they came as friends, and as such
they were kindly welcomed, and shared the hospitality of the
MacDonalds for a fortnight. Without any warning they turned on
their hosts, and before dawn of a winter's morning slew nearly all
the dwellers in the valley, old and young together, February 13,
1691. They then burnt the houses, and drove off the cattle, so that
nothing was left for the few wretched beings who had escaped
death but to perish miserably of cold and hunger. Whether William
knew the whole state of the case or not when he signed the warrant
is not certain, but he did not punish those who had dared to commit
this wholesale murder in his name. And though four years after,
when a stir was made about it, he did grant a commission to the
Privy Council to inquire into the matter, he did not bring to judgment
the Master of Stair, who was very clearly pointed out as the guilty
person.
58. Darien Scheme.—Just at this time the public attention was
taken up with a scheme for founding a new colony on the Isthmus of
Darien, and people's minds were so full of it that nothing else was
thought of. It was got up by William Paterson, who is to be
remembered as the originator of the Bank of England. He fancied
that he had found, what Columbus and the other navigators of his
day had sought in vain, a short cut to the Indies. His plan was to
plant a colony on the isthmus which unites North and South
America, and to make it the route by which the merchandise of the
East should be brought to Europe, thereby shortening the long sea-
voyage. He drew glowing pictures of the untold wealth that would
thus fall to the lot of those who were clear-sighted enough to join in
the venture. A charter was granted to the new Company, which gave
them a monopoly of the trade with Asia, Africa, and America for a
term of thirty-one years, with leave to import all goods duty free,
except foreign sugar and tobacco. Never had project been so
popular. Every one was anxious to take shares. Half the capital of
Scotland was invested in it, and poor and rich alike, deceived by
Paterson's lying stories of the healthiness and fertility of the soil and
climate, were eager to hasten to the new colony. A few vessels were
bought at Hamburg and Amsterdam. In these twelve hundred
emigrants set sail on the 25th July, 1698, and arrived safely on the
shore of the Gulf of Darien. They named the settlement which they
founded there New Caledonia, and built a town and a fort, to which
they gave the names of New Edinburgh and St. Andrews. But, to set
up such a trading market with any hopes of success, they ought to
have had the good will and help of the great trading countries of
Europe. Instead of this, England and Holland were much opposed to
the scheme, as being an interference with their trading rights. The
East India Company looked on the bringing in of Eastern
merchandise to Scotland as an infringement of their privileges. Spain
too claimed the Isthmus as her own, and seized one of the Scottish
ships; while the Governor of the English colonies in North America
refused to let them have supplies. In addition to these difficulties
from without, the climate was wretchedly unhealthy. Disease quickly
thinned their ranks, till at last the miserable remnant whom it spared
were glad to flee from almost certain death. They deserted the new
settlement, and set sail for New York. Meanwhile such glowing
reports of the success of the venture had been spread abroad at
home, that a second body of thirteen hundred emigrants, ignorant of
the fate of those who had gone before them, set sail in August of
the next year. They found the colony deserted, and the colonists
gone. They themselves fared no better than the first settlers, and
were in a few months driven out by the Spaniards. The Scottish
people were deeply mortified and much enraged by the failure of
this scheme. They blamed William for all the disasters of the
colonists, because he had done nothing to help them, nor to prevent
the interference of Spain. The Charter had been granted by the
Government of Scotland without the King's knowledge when he was
in Holland; and though he could not recall it, it would have been
unjust to his English subjects to show any favour to a scheme which,
had it succeeded, might have proved the ruin of their East Indian
trade. So much bad feeling arose out of this unfortunate affair
between the two nations, that it was plain that if there was not a
closer union between them there would be a breach before long.
59. William's Death.—Just as the project of an Union was
about to be considered in the English Parliament, William died,
March 8, 1702. Since the death of Mary, in 1690, he had reigned
alone. Both crowns now passed to Anne, the younger daughter of
James VII.
60. Education Act.—It was in this reign that the system of
national education which has made the Scotch, as a people, so
intelligent and well-informed, was re-cast. An Act was passed, in
1696, by which every parish was required to provide a suitable
schoolhouse, and to pay a properly qualified schoolmaster for the
instruction of the children of the parish.
61. Anne, 1702-1714. Act of Security.— James VII. had died
in France a few months before his nephew, and his son had been
proclaimed there as James VIII. This made the Whigs anxious to
have an Act passed in Scotland similar to the English Act of
Settlement. By this Act the Parliament of England had settled that, if
Anne died without heirs, the crown should pass to the nearest
Protestant heir, Sophia, Electress of Hanover, grand-daughter of
James the Sixth, or to her descendants. But the Estates still felt
injured and angry about the late differences with England, and
passed an Act of Security, which made express conditions that the
same person should not succeed to the throne of both kingdoms,
unless, during Queen Anne's reign, measures had been taken for
securing the honour and independence of the Scottish nation against
English influence. The right of declaring war against England at any
time was to remain with the Scottish Parliament.
62. Trial and Death of Captain Green.—Just at this time an
event happened which tended to increase the bad feeling between
the two countries. An English ship, the Worcester, was driven by
stress of weather into the Firth of Forth. It was seized by the Scots,
because the East India Company had some time before detained a
Scotch ship. From the talk of some of the crew it was suspected that
they had murdered the captain and crew of one of the Darien
vessels which was missing. On this charge Captain Green of the
Worcester, his mate and crew, were brought to trial before the High
Court of Admiralty. On the evidence of a black slave they were found
guilty and condemned, and Green, his mate, and one of the crew
were hanged. It was afterwards found out that the crime for which
they had suffered had never been committed. The missing ship had
gone ashore on the island of Madagascar, where Drummond, the
captain, was then living. Whatever wrongs the Scots had suffered,
the English had now, after this unlawful deed, a very reasonable
cause of complaint against them.
63. The Union.—It was clear that, if the two kingdoms were to
go on together in peace, it could only be by joining their Parliaments
and their commercial interests into one. Commissioners from both
sides were appointed to consider the best way of effecting this
union. Godolphin, the Treasurer of England, and the Duke of
Queensberry, the Royal Commissioner in Scotland, were its chief
promoters. The Commissioners drew up a Treaty of Union, which
was approved by the Parliaments of both countries. By the Articles of
Union the succession to both crowns was settled in the Protestant
heirs of Sophia; and each country was secured in the possession of
her national Church as then established. Scotland was to send
sixteen Representative Peers, elected from the whole body of Peers,
and forty-five members from the Commons, to the Parliament at
Westminster, henceforth to be called the Parliament of Great Britain.
It was further settled that one seal, with the arms of both kingdoms
quartered upon it, should serve for both countries, that both should
be subject to the same Excise duties and Customs, and should have
the same privileges of trade. The same coins, weights, and
measures were to be used throughout the island. The law-courts of
Scotland, the Court of Justiciary and the Court of Session, were to
remain unchanged, only there was now a right of appeal from the
Court of Session, which had hitherto been supreme in all civil cases,
to the House of Lords. In addition to the twenty-five Articles of
Union, a special Act was passed for securing the liberty of the
Church of Scotland as it then stood in all time coming, and declaring
that the Presbyterian should be the only Church government in
Scotland. The first Parliament of Great Britain met October 23, 1707.
64. Results of the Union.—Twice before this time the
Legislature of the two kingdoms had been thus joined together into
one, under Edward I. and under Cromwell. But these two unions,
each the result of conquest, had lasted but a little while. This Union
was destined to be more enduring, and to lead to increased
prosperity in both kingdoms. For Scotland it was the beginning of
quite a new state of things. Hitherto the struggle for national life had
left her no leisure for internal development, and at the time of the
Union she was without manufactures, shipping, or commerce. With
the end of her independent nationality a new social life began, and a
spirit of industry and enterprise was awakened, which has since
raised her people to their present eminence in trade, manufactures,
and agriculture. The Union struck the last blow at the power of the
Scottish nobles. They were not placed by any means on the same
level with the Peers of the sister kingdom. It brought to the
Commons, who during this period had been much despised and
oppressed, an increase in dignity and independence, by admitting
them to a share in the liberty and privileges which the Commons of
England had won for themselves with the sword. But what did even
more for the prosperity of Scotland was the removal of all
restrictions on her trade, which was now placed on the same footing
as that of the larger kingdom. For half a century after the union of
the crowns she had enjoyed free trade with England and her
colonies; but that was brought to an end by the Navigation Act,
passed soon after the Restoration, which forbade the importing of
any foreign goods into England except in English vessels, and which
was, as the Scots justly complained, the ruin of their rising
commerce.
65. Literature and Art.—Between the union of the Crowns and
the union of the Parliaments there was but little advance in literature
or art. This was in great part owing to the fact that, just when all
other nations had taken to writing in their own tongues in place of
Latin, the Scottish Court migrated to London. There the
Northumbrian English, which was the common speech of the
Lowlands of Scotland, was despised as a provincial dialect, in which
no educated man would write if he wished his writings to be read.
During this period, the talent that was to be found in the country
was enlisted in the religious struggle, which occupied all men's
minds, and it produced many divines eminent for eloquence and
learning. The literature of the times was, like the fighting, the
tyranny, and the persecutions, chiefly of a religious character. There
were many men of learning and talent, renowned either for their
writings or from their eloquence, to be found among the leaders of
the different sects. Among the Presbyterians the most eminent were
John Welch, the son-in-law of Knox; Alexander Henderson; Guthrie,
the martyr of the Remonstrants, and George Gillespie, who, from his
gift for argument, was called the "Hammer of the Malignants." The
Episcopal Church could boast of some scholarly divines, such as John
and Patrick Forbes, and Leighton, Archbishop of Glasgow. Of poets
there were but few; none who could bear comparison with those of
an earlier time. Drummond of Hawthornden is chief among them,
but his genius is obscured by an imitation of the dialect and style
then prevalent in England. Many of the beautiful ballads and songs
of which Scotland may justly be proud, must have been composed
about this time, but the authors are unknown. Unknown also, or
forgotten, are the musicians to whom Scotland owes the wild, sweet
strains to which those songs were sung, those pathetic melodies
which make the national music so peculiar and characteristic in its
exquisite beauty. The oldest collection of these airs is in a
manuscript which seems to date from the sixteenth century. To
George Jameson, the earliest Scottish painter of note, we owe the
life-like portraits of the heroes of these times. He was born at
Aberdeen and in 1620 he settled in his native town as a portrait-
painter. But the spirit of the Covenant was opposed to art. Though it
inspired to heroic deeds, there were no songs made about them.
Architecture fared even worse than poetry, for while churches, the
work of former ages, were pulled down, any new ones that were put
up were as ugly and tasteless as it was possible to make them.
Napier of Merchiston, a zealous reformer, the writer of an
Explanation of the Apocalypse, is known in the world of science as
the inventor of Logarithms, a clever and easy way of shortening
difficult numerical calculations.
66. Summary.—The union of the crowns of England and
Scotland put a stop to the constant skirmishing on the Border and to
the devastating inroads which had for centuries embittered the two
countries against one another. It might therefore have been
expected that Scotland, during the century which passed between
the union of the Crowns and the union of the Parliaments, would
have made great social advances. This was prevented by the
ceaseless party strife which disgraced the century, and made this
period one of the most disastrous and oppressive to the people in
the whole history of the nation. James the Sixth had found the strict
discipline and constant interference of the ministers so irksome, and
the turbulent independence of his nobles so little to his mind, that
he was delighted to escape from both to the richer kingdom to
which his good fortune called him. The severe training of his
childhood had made him hate the Presbyterian polity with all his
heart. As soon as he had the power, he changed the government of
the Church, and introduced various observances which were hateful
to the people. His son Charles went a step further, and by his
attempt to substitute an English for a Scottish Liturgy, drove the
people to revolt. The war thus begun, by an effort to force on the
hereditary kingdom of his race the customs of the larger kingdom
which his father had acquired, ended in his losing both. Scotland
enjoyed a short gleam of prosperity from the conquest of Cromwell
till his death. Under the next Stewart, Charles the Second, the King
to whom she had always been loyal, the government was entrusted
to a council, which exercised a cold-blooded tyranny against which
the people had no redress. This reign of terror only rooted their
religious prejudices the more firmly in their minds. When the tyrant
James was deposed, the reaction of popular feeling fell heavily on
the clergy of the Established Church, who individually were no way
accountable for the crimes which had been committed under the
mask of zeal for Episcopacy. Under William the Presbyterian polity
was re-established, and the Episcopal clergy had in their turn to
suffer many hardships from severe laws and the intolerance of party
feeling, though nothing to compare with the bloody persecution
under the form of law which had disgraced the reigns of Charles and
James.
CHAPTER VIII.
AFTER THE UNION.
ebookbell.com