Table of Contents:
1. Instructions
2. Program Code
3. Hinduism
4. Buddhism
5. China
Instructions:
1. Go to https://www.programiz.com/swift/online-compiler/ or
https://www.onlinegdb.com/online_swift_compiler#
2. Delete everything in the left side (Programiz) or the top (OnlineGDB).
3. Paste the entire Tab 2 document into the left/top side. (THE ENTIRE DOCUMENT!!
CTRL or CMMD + A)
4. Press the Run button to start.
5. Type your answer to the question and press Enter or Return.
6. Compare your answer with the displayed Correct Answer.
7. Type Y or N (not case sensitive) and press Enter or Return.
IMPORTANT NOTE: PDFs usually do not allow easy copy pasting of paragraphs. For
easier access, use the links on the last page.
IMPORTANT NOTE 2: Programiz has a considerably short session limit, and will
terminate the session after just a few minutes.
,var QAbank: [String] = ["1 + 1", "2", "3 * 2", "6", "4/2", "2"] //enter the test bank inside the square
brackets, "question", "answer", "question", "answer" format
var QLineup: [Int] = [0]
var i: Int = 0
QLineup.remove(at: 0)
while i < QAbank.count{
QLineup.append (i)
i=i+2
}
var Qnum: Int = 0
var answer: String
var Qstat: String
var Qstatstat: String
var CurrentQ: Int
var correct: Int = 0
var total: Int = 0
while QLineup.count > 0 {
Qstat = "?"
Qstatstat = "no"
Qnum = Qnum + 1
CurrentQ = QLineup[0]
print ("Questions remaining: ", QLineup.count)
print ("Question \(Qnum): ", QAbank [(QLineup[0])])
answer = readLine()!
print ("Correct Answer: ", QAbank[QLineup[0]+1])
while Qstatstat == "no" {
print ("Did you get it right? (y/n)")
Qstat = readLine()!
if Qstat == "y" || Qstat == "Y" {
QLineup.remove(at:0)
Qstatstat = "yes"
correct = correct + 1
} else if Qstat == "n" || Qstat == "N" {
QLineup.remove(at:0)
QLineup.append(CurrentQ)
Qstatstat = "yes"
}
}
total = total + 1
print ()
}
print ("Congratulations, you've finished!")
print ("Total score: ", correct, "/", total)
print ("Press Run to start again.")
, "Where did Hinduism develop?", "Hinduism developed in Ancient India. It is based on the
Vedas, which are four books written by a group of people that migrated south to present-day
India some time after 2000 BCE, called the Aryans. Vedas means 'knowledge' in Sanskrit, and
they are made up of sacred hymns of praise. They are said to have been revealed to the people
by the Brahman.", "Where did Hinduism spread?", "Hinduism spread to Southeast Asia along
the Silk Road, through word of mouth and traveling scriptures.", "What are the varnas/castes?",
"The varnas/castes are social classes with hundreds of ever-changing castes within, developed
over thousands of years. They are believed to be the four parts of a religious being who was
chopped up into four pieces.\n\nIts head is the Brahmin caste, with the least members. They are
priests and teachers, and they are closest to moksha. The arms are the Kshatriya caste, who
are warriors and leaders/royals. The thighs are the vaysiays, who are the farmers, merchants
and craftsmen who make everyday necessities. The feet are the sudras, who are the servants.
The sudra population is the largest, and are enslaved in some societies. They are the feet that
society stands on.", "Define monotheistic.", "Monotheistic is an adjective that describes a belief
system that believes in one higher being/god.", "Define polytheistic.", "Polytheistic is an
adjective that describes a belief system that believes in multiple higher beings/gods.", "Define
Brahman.", "Brahman is the primary being/universal spirit in Hinduism. It is present in everything
and everyone, and is said to be too complex for the human mind to understand. There are
human manifestations of Brahman known as Devas, who can be considered the many gods of
Hinduism, and why it is hard to define Hinduism as a monotheistic or polytheistic belief system.
For example, Brahma is the creator, Vishnu is the preserver, and Siva is the destroyer.", "Define
Karma", "Karma is a Hindu concept of a universal balancing force, where every action has a
reaction. It is accumulated throughout a lifetime, dependent on one's good and bad actions.
One's movement in the varnas after death is based on their karma.", "Define Dharma", "Dharma
is the religious duties of a Hindu, based on their varna, and it is their purpose in this life. For
example, if one is born as a kshatriya, it is better to be a bad warrior than to not be a warrior,
because their duty is to be a warrior.", "Define Samsara", "Samsara is the Hindu cycle of
reincarnation, or being reborn through the varnas. It is the process through which one reaches
Moksha. One can only move up one varna every lifetime, and most people spend many many
lives in each varna.", "Define Atman", "Atman is the Hindu concept of a soul. It is an eternal
force, is indestructible, can reincarnate and go into the afterlife, etc. Every person has one, and
it is a small part of Brahman.", "Moksha", "Moksha is the ultimate goal of Hinduism, where one
is released from the cycle of Samsara by accumulating sufficient good karma, which often takes
hundreds and hundreds of lifetimes."