Thursday, 8 December 2016

WELCOME TO QBASIC



Chapter 1: Introduction to BASIC
Programming
Have you ever, when seeing a game or another program, asked yourself : How did they do that? 
Every program, every game you run on your computer, has been written by someone using a special software development tool called a programming language.
By definition:    A program is a set of instructions that makes the computer work.  The instructions constitute of keywords, sometimes called reserved words, that have special functions such as:
  • Clearing the screen
  • Writing data to the screen
  • Getting user input
  • Executing loops
  • Changing colours
  • Playing sounds
  • Opening files
  • Etc.
There are different programming languages. Some are difficult to use, understand, other are limited to special purposes such as scientific calculations, drawing or database management.
Some programming languages out there:

The Qbasic IDE


The Qbasic IDE

The Qbasic IDE is quite simple to understand. It is divided into two windows: the Untitled Window and the Immediate window.
You should type your instructions in the untitled window.
To run your program, click on  Run -> Start  or  Press F5
To get out of Qbasic, click on  File -> Exit.
We'll see more about the Qbasic IDE later.

Two BASIC reserved words

It is not necessary for you to know all the BASIC reserved words to get started. You could write a lot of  programs using about 10 keywords. To get started we'll be using only two of them:
CLS
This statement is used to clear the screen.
PRINT
The PRINT statement is used to display data on the screen.

Your First BASIC program

To begin we will write a simple program that will output a text on the screen.
Type the following in the untitled window:
PRINT "Hello!"
PRINT "This is my first BASIC program."
To run your program:
Click on Run Start
or
Press the function key F5
The output on the screen will be as follows:
Hello!
This is my first program.







Press any key to continue
Once the execution of your program is completed, BASIC will display a "Press any key to continue" message on the screen. So press any key to return to your programming environment.
If you run your program many times, you will notice that the same text will be displayed several times on the screen as shown below:
Hello!
This is my first program.
Hello!
This is my first program.
Hello!
This is my first program.
Hello!
This is my first program.




Press any key to continue
To get your screen cleared each time you run you program, put the CLS statement at the beginning of your program:
CLS
PRINT "Hello!"
PRINT "This is my first BASIC program."
Note the presence of inverted commas(" ") in the PRINT statement. Always put inverted commas if you want to output sentences or characters.

Mathematics symbols

Some mathematical operators and their BASIC equivalent:
Operation
Mathematics
BASIC equivalent
Plus
+
+
Minus
-
-
Multiply
x
*
Divide
/
Exponential
a2
a^2

 

Storing data in the computer memory
Data types: Constants and Variables

You may need to store data in the computer when writing your program.
Data is classified into 2 types:
  • Numbers
  • Character Strings
Example of numbers:
10    +5    0.32    -1.234
Examples of character strings:
"Hello! how are you?"   "John Smith"   "14 Royal Road"   "$123"
Characters consist of letters, numbers, symbols and special characters.
To store data in the memory you will need to put them first in memory variables or constants.
A memory variable will store values that vary, change.
A memory constant will store values that remain constant (i.e. they don't change).

The Computer Memory

The memory of the human being contains millions of cells that store the different information that you have acquired in your life. Similarly the computer memory could be represented as storage cells. Each cell can be given a name or an address as follows:
Value
10
+5
0.32
-1.234
name of cell
a
b
c
d

Value
Hello! How are you
John Smith
14 Royal Road
$123
name of cell
a$
b$
c$
d$


Declaring variables

BASIC has received many critics because of its ability of creating & declaring variables on the fly. Qbasic allow you to declare variables.
The DIM statement is used to specify a data type for a variable. Variables declared should not end with a suffix.
The syntax is as follows:
DIM variable AS type
Example:
 
DIM userrname AS STRING
DIM age AS INTEGER
username = "John Smith"
age = 23
The code above is equivalent to
username$ = "John Smith"
age% = 23
So what method of working with variables is better?
Personally, though you might encounter both ways in the tutorial, I prefer to use the first one. It's a good habit to declare every variable you use.

Thursday, 26 May 2016

RAMADAN

FUEL SCARCITY IN NIGERIA..

 WATCH THIS VIDEO FOR THE BEST SUGGESTION

THE Federal Government, yesterday, urged Nigerians to exercise patience over the fuel crisis currently witnessed across the country, while it assured the public that the fuel queues currently witnessed in petrol stations would disappear within the next 72 hours, as it has stepped up activities to ensure a significant increase in fuel supply. Long queue of jerry cans at a petrol station as fuel scarcity bites harder, yesterday. Photo: Joe Akintola, Photo Editor. Speaking during a monitoring exercise of fuel stations in Abuja, the Minister of State for Petroleum Resources, Dr. Ibe Kachikwu, also warned that, henceforth, any oil marketer caught hoarding the product, would be forced to dispense all the products in its tanks to motorists for free, while stiff sanctions would be meted out to the marketer subsequently.

Kachikwu, who is also the Group Managing Director of the Nigerian National Petroleum Corporation, NNPC, said, “There is enough supply within our facilities. Some of the pipeline issues are being addressed. We are moving stock massively. Most of the stations in Abuja have products right now; it is just a matter of time before the queues disappear.

DISAPPEARANCE OF QUEUES
“I have also instructed DPR, as they proceed, if they see any station that has the product and is not selling, they shouild sell all the products for free to customers and we will impose heavy sanctions on that filling stations. So sealing them, is not the answer, it is penalising them that matters. I urge Nigerians to be patient, stop panic buying, No need for panic buying, there is product, and we are going to get to everybody.”

He further stated that the Federal Government would pay oil marketers the amount owed them as subsidy immediately it secures the approval of the National Assembly. He, however, lamented that sustaining subsidy payments at the current level is a major problem for the country and it is happening through the magnanimity of the president.

FG to review fuel pricing mechanisms to check subsidy burden.
To this end, he said, “By January, we will have price regulation dynamics that will enable us address the critical issues for the marketers. We are going to look at the pricing dynamics to see how we are going to sustain supply at the current environment. We are going to look at it to see if we have enough budgetary provisions to deal with those issues. We are working closely with the president and we are going to find solutions to this problem.” Also speaking, Director of the Department of Petroleum Resources, Mr. Mordecai Ladan, assured Nigerians that fuel was available and there was enough quantity to go round the country. He, however, appealed to Nigeria to desist from panic buying, saying that “If we are patient enough, within the next 72 hours, the queues would thin out.”

149 truckloads of fuel deployed to Abuja, environs — DPR:
Meanwhile, the Department of Petroleum Resources, DPR, yesterday, stated that 149 truckloads of Premium Motor Spirit, PMS, also known as petrol, were deployed to oil marketers in Abuja and other surrounding states on Tuesday, November 17, 2015. The DPR, in a statement by its Head, Public Relations, Abuja, Mr. Mohammed Saidu, stated that of the 149 trucks, 99 were dispersed to Abuja, while the rest were deployed to surrounding states. Giving the breakdown of fuel supply to oil marketers in Abuja and the number of trucks allocated to them, the DPR stated that Forte Oil received four trucks; Conoil received 10 trucks; Mobil – eight trucks; MRS – seven trucks; NIPCO – six trucks; Oando – 11; Total Plc – 14 trucks; NNPC Retails – 34 trucks and IPMAN – five trucks. The DPR also stated that the immediate environs outside Abuja received 32 trucks while others received 18 trucks. NNPC deploys 38 million litres across Nigeria: The NNPC, however, stated that 38.278 million litres of fuel were dispatched to petrol stations across the country on Monday, November 16, 2015. The NNPC, in its Daily Dispatch Report to Filling Stations, stated that its Suleja depot trucked out 6.62 million litres; Kaduna depot – 1.85 million litres; Kano – 6.15 million litres; Minna – 0.3 million litres; Gusau depot – 3.444 million litres; Mosimi depot -4.2 million litres and Satellite depot – 3.49 million. Others are: Ilorin depot – 0.629 million litres; Ore – 0.832 million; Ibadan – 0.413 million; Gombe – 5.3 million litres; Benin – 0.331 million litres; Port Harcourt – 0.032 million litres; Aba – 0.179 million litres; Makurdi – 1.58 million litres and Enugu depot – 2.933 million litres.

CLICK TO WATCH SOLUTION




Thank You Poems for Parents

Thank You Poems for Parents

Mom & Dad

I can't repay the lessons That you taught when I was small.
Or give you gift for gift The daily treasures I recall...
I can't return encouragement And loving words of praise.
In quite the way you did for me Through all my childhood days.
But there is one gift that I can give, It's all the love you've earned.
For love is what you always taught... And love is what I learned.

Thank You to My Parents

Thank you for always being there
and knowing just what to do
Thank you for knowing the words to say
when I'm feeling way beyond blue

Thank you for patiently listening
to all my worries and stresses
Thank you for caring enough
to get me out of all my messes

Thank you for being a phone call away
or around the corner to run to
Thank you for your door always being open
and knowing just what to do

Thank you for being my constant support
when i didn't think I could cope
Thank you for lifing my spirits
and letting me know there IS hope

Thank you for being the best parents
a daughter could ever wish for
I love you with all my heart
today and forever more.

To My Parents, I Love You

I have gone through
so many different stages
changing ideas and goals
while searching for the
right kind of life for me
You were always
ready to help me
at all times
It must have seemed like
I would never
follow one straight path
Now that I know
what I am doing and
where I am going
I can only show you
my extreme appreciation
for your support
by being true
to all the ideals and values
that you tried to teach me
Thank you forever
for standing by me
I love and appreciate
you forever.

PLEASE WATCH THIS VIDEO BELOW....

CLICK TO WATCH VIDEO DEDICATED TO PARENT

Monday, 7 March 2016

ENOUGH OF ISLAMOPHOBIA...




Islamophobia has been on the rise in the United States ever since 9/11. The Republican Presidential primary has both revealed this troubling trend and exacerbated it. Trump and other politicians have been trading on fear and hatred of Muslims for political expediency. They build on a foundation that has been laid, in large degree, by a consistent stream of Islamophobic rhetoric from the Christian Right. Now we have a xenophobic mood in this country that reminds people of the rise of Nazism in Germany.
When Hitler came to power in Germany, a vocal minority of Christian leaders--the Confessing Church movement--opposed Nazism. Among the leaders of this movement, Dietrich Bonhoeffer is the most notable. He died in prison after participating in a failed conspiracy to assassinate Hitler. In his prison writings, he disavowed Christian anti-Semitism and embraced the fact that Jesus Christ was a Jew. In doing so he broke with the historic anti-Semitism of Lutheranism and of Christianity in general which can be traced back to the early centuries of Christianity. For example, leaders like Archbishop of Constantinople John Chrysostom (mid-late 4th century), who is regarded as a saint, preached with hatred and vitriol against his Jewish neighbors, blaming them for killing Christ. His sermons incited mob violence against Jews. This kind of scapegoating of Jews is so entrenched in Christianity it can even be clearly seen in the Gospels themselves. In the Gospel of John Jews are called "children of the devil" and in the Gospel of Matthew Jewish bystanders at Jesus' execution say, "His blood be on us and on our children" (Matt 27:25, NRSV). Since the Shoah (Holocaust), mainstream Christians, including Protestants, Catholics, and Orthodox Christians have fundamentally revised our views on Jews and Judaism; we've acknowledged Christianity's historic anti-Semitism and no longer blame Jews for killing Christ or attempt to convert Jews to Christianity. Today, Christian leaders of conscience are called to take a vocal stand against Islamophobia. We are called to root Islamophobia out of our religion before it leads to another genocidal catastrophe.
As is the case with Christian anti-Semitism, Christian Islamophobia has deep roots. In the oldest Christian writings on Islam, St. John of Damascus' Against Heresies (8th century CE), Muhammad is presented as a heretic inspired by the devil; Islam itself is categorized as a Christian heresy. Tragically, this has been the dominant Christian assessment of Muhammad and Islam up until the present day, with influential figures such as Dante, Thomas Aquinas, and Martin Luther all making similarly inflammatory claims. In the 15th century, Nicholas of Cusa was distressed by the wars between Christians and Muslims and sought to unify the religions theologically. However, he did not succeed and instead ended up writing a diatribe refuting the Qur'an and again framing Muhammad as a devil-inspired heretic. The most notable counter-example to this rather dismal tradition of Christian polemic against Islam is St. Francis of Assisi. During the crusades of the 13th century, Francis was successful in dialoging with Sultan Malek al-Kamil of Egypt and negotiating a truce between Christian and Muslim fighters. The Sultan was not interested in negotiating with the Pope or any other leader, but only with Francis, whom he admired and trusted as a person of integrity, peace, and devotion to God. The Christian Right in the United States has not invented Islamophobia, they are merely continuing this hateful vein of the Christian tradition. From the beginning, Christians have reacted to Islam in a spirit of competition and mistrust. Instead of embracing and appreciating Islam as a sibling faith, Christians have tried to discredit Islam. Now, in the 21st century, it is high time for Christians to acknowledge how wrong we have been. Islam is the second-largest religion on the planet and is an integral part of human civilization as we know it. Islam is a beautiful, complex religion that supports human dignity, arts and sciences, spirituality, economic, environmental and racial justice, and so much more. As Christians today we are called to acknowledge the integrity of Islam and embrace Muslims as brothers and sisters in faith. And the key, I believe, to making this paradigm shift is choosing to see Muhammad differently, in light of our faith.
Just as Bonhoeffer embraced the fact that Jesus Christ was a Jew, thus identifying himself as a Christian with and for Jews, so too Christians today have the opportunity to identify ourselves with and for Muslims by positively identifying Jesus with Muhammad. The foundation of Christian Islamophobia (fear of Islam) is a rejection of Muhammad as a spirit of error; the foundation of Christian Islamophilia (love of Islam) is an embrace of Muhammad as a spirit of truth. Jesus, in the Gospel of John, predicts the coming of a future prophet he calls "the spirit of truth":
"I still have many things to say to you, but you cannot bear them now. When the Spirit of truth comes, he will guide you into all the truth; for he will not speak on his own, but will speak whatever he hears, and he will declare to you the things that are to come. He will glorify me, because he will take what is mine and declare it to you. All that the Father has is mine. For this reason I said that he will take what is mine and declare it to you." (John 16:12-15, NRSV)
Today as Christians we have the opportunity to embrace Muhammad, the Qur'an, and Islam in an expression of faith in Jesus. This kind of embrace would have major political implications and would radically alter the quality of Christian-Muslim relations. We have the chance now to acknowledge and let go of Christianity's polemical reactions against Islam, and to seek a collaborative relationship with Muslims. This crucial adaptation of Christianity--choosing to see Muhammad as a "spirit of truth" whom Jesus said would guide us into all the truth--will allow Christianity and Islam to work together for peace, justice, and the healing of Earth; it will help put an end to the predisposition of Christians to mistrust and fear Muslims.
In the Qur'an, Jesus says, "'O Children of Israel! Truly I am the Messenger of God unto you, confirming that which came before me in the Torah and bearing glad tidings of a Messenger to come after me whose name is Ahmad'" (61:6, The Study Quran). In this verse we have a vision of Jesus that affirms both Judaism and Islam; this is the vision of Jesus I believe that Christians are being called by God to adopt in the 21st century. Imagine a Christianity that could embrace the full Jewish-Christian-Muslim canon of sacred literature and engage in a free-flowing theological and ethical dialogue with Jewish and Muslim neighbors. Imagine a Christianity open to the transformation and healing this dialogue would bring to the whole Abrahamic family of faith. Yes, Christianity has made major mistakes in regards to both Judaism and Islam; our tradition is replete with anti-Semitism and Islamophobia. But it is within our power to learn from our history and course-correct going forward. Our tradition's first assessment of Muhammad has been a disaster and has fueled centuries of conflict between Christians and Muslims. But it is not too late to recognize Muhammad as the one Jesus promises he will send to us: "the spirit of truth who comes from the Father, he will testify on my behalf" (John 15:26b, NRSV). "You also are to testify," Jesus says, "because you have been with me from the beginning" (John 15:27, NRSV). As faithful followers of Jesus, it is time for us to testify about the integrity of Muhammad and Islam, to testify that Jews and Muslims are our closest siblings in faith. This testimony can help set a new course for a century and a millennium of peace between Jews, Christians, and Muslims.