Labels

December 14, 2020

KNOWLEDGE FOR JOBS TEST (ARMY,PAF,NAVY,POLICE,ETC.) ISLAMIC QUESTION AND KNOWLEDGE QUESTIONS

MAIN INFORMATION....

 

PROPHET MUHAMMAD(PBUH)

• Holy Prophet was born in 571 A.D 22nd April ( Day__ Monday).

• At 25 Prophet married to Hazrat Khadija.

• Hazrat Khadija accepted Islam first in Women and in all.

• Hazrat Abu Bakar accepted first in Men.

• Hazrat Ali accepted first in Children.

• Varqa Bin Naufal verified Prophet for the first time.

• Holy prophet had 4 daughters and 3 sons.

• At age of 40 holy Prophet received first Wahi.

• In 622 A.D Holy Prophet migrated to madina.

• Second migration to Habshah took place in 616 A.D

• Hazrat Haleema was the foster mother of Holy Prophet.

• Besides Hazrat Haleema (RA) Holy Prophet (PBUH) said that Umme-e-Aemon is also my mother.

• Name the foster mother(s) of the Holy Prophet (SAW)-- Hazrat Halema (RA), Hazrat Sowaba (RA) and Hazrat Khola (RA)

• How many years after the birth of Holy Prophet (SAW), Hazrat Aamina died? Six years

• Sheema was the foster sister of Holy Prophet.

• Hazrat Haleema looked after the holy prophet for 4 years.

• 35 was the age at the time of Hajr-i-Aswad incident.

• Hazrat Bilal Habshi was the first slave to accept Islam.

• Hazrat Adam met with Holy Prophet on the first heaven.

• Hazrat Isa and Hazrat Yahya on 2nd.

• Hazrat Yaqub on 3rd.

• Hazrat Idrees on 4th.

• Hazrat Harron on 5th.

• Hazrat Musa on 6th.

• Hazrat Ibraheem on 7th.

• 27 total no of Ghazwas.

• First Ghazwah of Islam was Widan (Abwa), fought in 12th month of First Hijrah.

• Jang Badr occurred in 2 A.H. 313 Muslims fought in battle.

NAMAZ

• 48 total numbers of Rakats are in Farz prayer.

• Namaz-e-Khasoof is offered for Moon Eclipse.

• Namaz-e-Kasoof is offered for Solar Eclipse.

• Namaz-e-Istasqa is offered for Rain.

• Farz in wuzu=4, Sunats=14.

• Farz in Ghusual=3, Sunats=5

• Second migration to Habshah took place in 616

OIC (organization of Islamic conference) was established May 1969 has 57 members and it’s headquarter is situated in Jedah.

North Atlantic treaty organization (NATO) was established in 1949 ( head office in Brussels ) (28 memer countries)

(SAARC) south asian association for reginal copperation DEC 8,1985 KATHMANDU

(CPEC) chaina pakistan econamic coridore

UNO united nations organization 24,oct, 1945 New yark

RCD regeinal cooperation development 1964,tehran

• The first Pakistani to receive the Nobel Prize was Abdul Salam in 1979 (physics)

World Bank established in?

( World Bank was established in 1944)

• Longest wall is Great Wall of China 1550 miles(6700km) long, which is built in 214 BC. • The word Quran means “read one”.

• 114 total number of Surah

• Surah means city of Refuge.

• 86 Makki Surah.

• 28 Madine Surah.

• 558 Rukus.

• Al-Baqrah is the longest Surah.

• Al- Kausar is the shortest Surah.

• Al-Nass is the last surah.

• 14 bows are in Quran.

• Al-Tauba does not start with Bismillah.

• 6666 is the number of Ayats.

• Taurat Hebrew

• Injil Siriac

• Zubur Siriac

• Holy Quran Arabic.

• Meaning of Aayat is Sign.

• Surahs named after animals are 4 in number.

• Namal means Ant.

• Surah Inaam means Camel.

• Surah Nahl means Honey bee.

• Surah Ankaboot means spider.

• Surah Anfal means Cave.

• In Naml two bismillah occur (2nds one is at aayat no:30)

• Caspian Sea is the largest salt water lake in the world.

• What is the worlds largest sea (in area): South China

• World’s largest earth filled dam is Tarbela. • The world’s largest desert Sahara is located in Africa.

Monaco has the shortest and Canada has the largest coastline country in the world.

SAARC was formed in Dhaka on December 8, 1985.

9. What is Sunnah? Actions of Hazrat Muhammad (PBUH)

The national flag of Pakistan was designed by Amiruddin Kidwai.

Pakistan national flag was adopted on 11 August, 1947.

• The Chief Minister of NWFP refused to salute the Pakistani flag in 1947.

• Pakistan's flag was designed by two brothers and name of one of them is Altaf Hussain. White strip in the flag was added in August 1947 and moon and star added in the flag February 1949.


MS OFFICE (MS WORD) BEST AND CODE

 MS WORD EASY CODE 

Ctrl+0

Toggles 6pts of spacing above the paragraph.

Ctrl+A

Select all contents of the page.

Ctrl+B

Bold highlighted selection.

Ctrl+C

Copy selected text.

Ctrl+D

Open the font preferences window.

Ctrl+E

Aligns the line or selected text to the center of the screen.

Ctrl+F

Open find box.

Ctrl+I

Italic highlighted selection.

Ctrl+J

Aligns the selected text or line to justify the screen.

Ctrl+K

Insert a hyperlink.

Ctrl+L

Aligns the line or selected text to the left of the screen.

Ctrl+M

Indent the paragraph.

Ctrl+N

Opens new, blank document window.

Ctrl+O

Opens the dialog box or page for selecting a file to open.

Ctrl+P

Open the print window.

Ctrl+R

Aligns the line or selected text to the right of the screen.

Ctrl+S

Save the open document. Like Shift+F12.

Alt+F, A

Save the document under a different file name.

Alt+X

Show the Unicode code of a highlighted character.

Ctrl+T

Create a hanging indent.

Ctrl+U

Underline the selected text.

Ctrl+V

Paste.

Ctrl+W

Close the currently open document.

Ctrl+X

Cut selected text.

Ctrl+Y

Redo the last action performed.

Ctrl+Z

Undo last action.

Ctrl+Shift+L

Quickly create a bullet point.

Ctrl+Shift+F

Change the font.

Ctrl+Shift+>

Increase selected font +1pts up to 12pt and then increase font +2pts.

Ctrl+]

Increase selected font +1pts.

Ctrl+Shift+<

Decrease selected font -1pts if 12pt or lower; if above 12, decreases font by +2pt.

Ctrl+[

Decrease selected font -1pts.

Ctrl+/+c

Insert a cent sign (¢).

Ctrl+'+<char>

Insert a character with an accent (acute) mark, where <char> is the character you want. For example, if you wanted an accented é you would use Ctrl+'+e as your shortcut key. To reverse the accent mark, use the opposite accent mark, often found on the tilde key.

Ctrl+Shift+*

View or hide non printing characters.

Ctrl+<left arrow>

Moves one word to the left.

Ctrl+<right arrow>

Moves one word to the right.

Ctrl+<up arrow>

Moves to the beginning of the line or paragraph.

Ctrl+<down arrow>

Moves to the end of the paragraph.

Ctrl+Del

Deletes word to right of cursor.

Ctrl+Backspace

Deletes word to left of cursor.

Ctrl+End

Moves the cursor to the end of the document.

Ctrl+Home

Moves the cursor to the beginning of the document.

Ctrl+Spacebar

Reset highlighted text to the default font.

Ctrl+1

Single-space lines.

Ctrl+2

Double-space lines.

Ctrl+5

1.5-line spacing.

Ctrl+Alt+1

Changes text to heading 1.

Ctrl+Alt+2

Changes text to heading 2.

Ctrl+Alt+3

Changes text to heading 3.

Alt+Ctrl+F2

Open new document.

Ctrl+F1

Open the Task Pane.

Ctrl+F2

Display the print preview.

Ctrl+Shift+>

Increases the selected text size by one font size.

Ctrl+Shift+<

Decreases the selected text size by one font size.

Ctrl+Shift+F6

Switches to another open Microsoft Word document.

Ctrl+Shift+F12

Prints the document.

F1

Open help.

F4

Repeat the last action performed (Word 2000+).

F5

Open the Find, Replace, and Go To window in Microsoft Word.

F7

Spellcheck and grammar check selected text or document.

F12

Save As.

Shift+F3

Change the text in Microsoft Word from uppercase to lowercase or a capital letter at the beginning of every word.

Shift+F7

Runs a Thesaurus check on the selected word.

Shift+F12

Save the open document. Like Ctrl+S.

Shift+Enter

Create a soft break instead of a new paragraph.

Shift+Insert

Paste.

Shift+Alt+D

Insert the current date.

Shift+Alt+T

Insert the current time.

You can also utilize the mouse to perform some common actions. The following section contains examples of mouse shortcuts.

Mouse shortcuts

Description

Click, hold, and drag

Selects text from where you click and hold to the point you drag and let go.

Double-click

If double-clicking a word, selects the complete word.

Double-click

Double-clicking on the left, center, or right of a blank line makes the alignment of the text left, center, or right aligned.

Double-click

Double-clicking anywhere after text on a line sets a tab stop.

Triple-click

Selects the line or paragraph of the text where the mouse is triple-clicked.

Ctrl+Mouse wheel

Zooms in and out of document.

 

December 09, 2020

CHECK POINT AND EXERCISE CHAPTER 2 PYTHON 4TH EDITIION FOR BSCS NOTES

CHECKPOINT AND EXERCISE OF CHAPTER 2

(CHAPTER NO.2)

Checkpoint

2.1 = Who is a programmer’s customer?

Ans.  Any person, group, or organization that is asking you to write a program. 

 

2.2 =  What is a software requirement?

Ans.  A single function that the program must perform in order to satisfy the customer.

 

2.3 = What is an algorithm?

Ans. An algorithm is a specific procedure for solving a well-defined computational problem. The development and analysis of algorithms is fundamental to all aspects of computer science: artificial intelligence, databases, graphics, networking, operating systems, security, and so on.

 

2.4 = What is pseudocode?

Ans. Pseudocode is a way of expressing an algorithm without conforming to specific syntax rules

 

2.5 What is a flowchart?

Ans. A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows.

 

2.6 What do each of the following symbols mean in a flowchart?

• Oval

• Parallelogram

• Rectangle

Ans. Oval - terminal (start/end), Parallelogram - I/O, Rectangle - processing symbols

2.7 Write a statement that displays your name

Ans. print("Awais Bscsf2020m50")

2.8 write a statement that displays the following text: Python's the best!

Ans. print("Python's the best!")

 

2.9 Write a statement that displays the following the following text: The cat said "meow."

Ans.print('The cat said "meow."')

 

2.10 What is a variable?

Ans. a name that represents a value stored in memory

 

 

2.17 You need the user of a program to enter a customer’s last name. Write a statement

that prompts the user to enter this data and assigns the input to a variable.

 

Ans. Customer_last_name = input("Please enter the customer's last name: ")

 

 

2.18 You need the user of a program to enter the amount of sales for the week. Write a

statement that prompts the user to enter this data and assigns the input to a variable.

 

Ans. Weekly_sales = float(input("Please enter the weekly sales: "))

 

2.22 How do you suppress the print function’s ending newline?

 

Ans. if you do not want the print function to start a new line of output when it finishes displaying its output, you can pass the special argument end = ' ' to the function

 

2.23 How can you change the character that is automatically displayed between

multiple items that are passed to the print function?

 

Ans. you can pass the argument sep= to the print function, specifying the desired character

 

2.24 What is the '\n' escape character?

 

Ans. the backslash "\" is a special character, also called the "escape" character. It is used in representing certain whitespace characters: "\t" is a tab, "\n" is a newline, and "\r" is a carriage return.

 

2.25 What does the + operator do when it is used with two strings?

Ans.  String concatenation- useful for breaking up a String literal so a lengthy call to the print function can span multiple lines

2.28 What are three advantages of using named constants?

Ans. Make programs more self-explanatory, widespread changes can be made easier, and they help prevent typographical errors common to writing magic numbers

 

2.29 Write a Python statement that defines a named constant for a 10 percent discount.

Ans. DISCOUNT_RATE = .10

2.30 What is the turtle’s default heading when it first appears?

 

Ans. The first step in using Python's turtle graphics system; it is stored in a file known as the "turtle module;" this statement loads the turtle module into memory so the Python interpreter can use it

 

 

2.31 How do you move the turtle forward?

 

Ans. This command moves the turtle forward n pixels

 

 

2.32 How would you turn the turtle right by 45 degrees?

 

Ans. RIGHT 90 or RT 90 (press ENTER) will turn the turtle to the right 90 degrees. LEFT 1 or L T 1 will turn the turtle to the left I degree. RIGHT 45 or RT 45 will turn the turtle to the right 45 degrees. Try changing the number of degrees after the commands, LEFT and RIGHT.

 

 

2.33 How would you move the turtle to a new location without drawing a line?

 

Ans. When you move the cursor (turtle), if the pen is down, the turtle draws a line from the current position to the new one. If the pen is up, the position of the turtle changes to the new one, but no line is drawn. You can draw a dot or a circle of a given size, too.

 

 

2.34 What command would you use to display the turtle’s current heading?

 

Ans. turtle.heading()

 

 

2.35 What command would you use to draw a circle with a radius of 100 pixels?

 

Ans. turtle.circle(100)

 

2.36 What command would you use to change the turtle’s pen size to 8 pixels?

 

Ans. turtle.pensize(8)

 

 

2.37 What command would you use to change the turtle’s drawing color to blue?

 

Ans. turtle.pencolor(‘blue’)

 

 

2.38 What command would you use to change the background color of the turtle’s

graphics window to black?

 

Ans. turtle.bgcolor('black')

 

 

2.39 What command would you use to set the size of the turtle’s graphics window to

500 pixels wide by 200 pixels high?

 

Ans. turtle.setup(500,200)

 

 

2.40 What command would you use to move the turtle to the location (100, 50)?

 

Ans. turtle.goto(100,50)

 

 

2.41 What command would you use to display the coordinates of the turtle’s current position?

 

Ans. turtle.pos()

 

 

2.42 Which of the following commands will make the animation speed faster? turtle.

speed(1) or turtle.speed(10)

 

Ans. turtle.speed(10)

 

 

2.43 What command would you use to disable the turtle’s animation?

 

Ans. turtle.speed(0)

 

 

2.44 Describe how to draw a shape that is filled with a color.

 

Ans. turtle.begin_fill() before shape draws
turtle.end_fill() after she is drawn

 

 

2.45 How do you display text in the turtle’s graphics window?

Ans. turtle.write()

Review Questions

Multiple Choice

·         1.A __________ error does not prevent the program from running, but causes it to

produce

incorrect results.

a)       syntax

b)       hardware

c)        logic

d)       fatal

 

·         2.A __________ is a single function that the program must perform in order to satisfy

the customer.

a)       task

b)       software requirement

c)        prerequisite

d)       predicate

 

·         3.A(n) __________ is a set of well-defined logical steps that must be taken to perform a task.

a)       logarithm

b)       plan of action

c)        logic schedule

d)       algorithm

 

·         4.An informal language that has no syntax rules and is not meant to be compiled or

executed is called __________.

a)       faux code

b)       pseudocode

c)        Python

d)       a flowchart

 

·         5.A __________ is a diagram that graphically depicts the steps that take place in a

program.

a)       flowchart

b)       step chart

c)        code graph

d)       program graph

 

·         6. A __________ is a sequence of characters.

a)       char sequence

b)       character collection

c)        string

d)       text block

 

·         7. A __________ is a name that references a value in the computer’s memory.

a)       variable

b)       register

c)        RAM slot

d)       byte

 

·         8. A __________ is any hypothetical person using a program and providing input for it.

a)       designer

b)       user

c)        guinea pig

d)       test subject

 

·         9. A string literal in Python must be enclosed in __________.

a)       parentheses.

b)       single-quotes.

c)        double-quotes.

d)       either single-quotes or double-quotes

·         .

·         10. Short notes placed in different parts of a program explaining how those parts of the

program work are called __________.

a)       comments

b)       reference manuals

c)        tutorials

d)       external documentation

 

·         11. A(n) __________ makes a variable reference a value in the computer’s memory.

a)       variable declaration

b)       assignment statement

c)        math expression

d)       string literal

 

·         12. This symbol marks the beginning of a comment in Python.

a)       &

b)       *

c)        **

d)       #

 

·         13. Which of the following statements will cause an error?

a)       x = 17

b)       17 = x

c)        x = 99999

d)       x = '17'

 

·         14. In the expression 12 + 7, the values on the right and left of the + symbol are called

__________.

a)       operands

b)       operators

c)        arguments

d)       math expressions

 

·         15. This operator performs integer division.

a)       //

b)       %

c)        **

d)       /

 

·         16. This is an operator that raises a number to a power.

a)       %

b)       *

c)        **

d)       /

 

·         17. This operator performs division, but instead of returning the quotient it returns the

·         remainder.

a)       %

b)       *

c)        **

d)       /

 

·         18. Suppose the following statement is in a program: price = 99.0. After this statement

executes, the price variable will reference a value of which data type?

a)       int

b)       float

c)        currency

d)       str

 

·         19. Which built-in function can be used to read input that has been typed on the keyboard?

a)       input()

b)       get_input()

c)        read_input()

d)       keyboard()

 

·         20. Which built-in function can be used to convert an int value to a float?

a)       int_to_float()

b)       float()

c)        convert()

d)       int()

 

·         21. A magic number is ________________.

a)       a number that is mathematically undefined

b)       an unexplained value that appears in a program’s code

c)        a number that cannot be divided by 1

d)       a number that causes computers to crash

 

·         22. A __________ is a name that represents a value that does not change during the program’s

execution.

a)       named literal

b)       named constant

c)        variable signature

d)       key term

True or False:-

 1. Programmers must be careful not to make syntax errors when writing pseudocode programs. False

2. in a math expression, multiplication and division take place before addition and subtraction. True

3. Variable names can have spaces in them. False

4. In Python, the first character of a variable name cannot be a number. True

 5. If you print a variable that has not been assigned a value, the number 0 will be displayed. False

Short Answer

1. What does a professional programmer usually do first to gain an understanding of a

problem?

Ans. Programmers will conduct an initial interview with their customer to understand what exactly the customer wants out of the program and how it should function.

 

2. How does pseudocode differ from actual code written in a programming language?

Ans. Pseudocode is not an actual programming language. So it cannot be compiled into an executable program. It uses short terms or simple English language syntaxes to write code for programs before it is actually converted into a specific programming language

 

 

3. Computer programs typically perform what three steps?

Ans. Computer programs typically perform three steps: input is received, some process is performed on the input, and output is produced.

 

 

4. What rules and considerations should influence the names given to variables in a

program?

Ans. All variable names must begin with a letter of the alphabet or an. underscore( _ ). ...

After the first initial letter, variable names can also contain letters and numbers. ...

Uppercase characters are distinct from lowercase characters. ...

You cannot use a C++ keyword (reserved word) as a variable name

 

 

 

5. What is the difference between floating-point division and integer division?

Ans. The division operator / means integer division if there is an integer on both sides of it. If one or two sides has a floating point number, then it means floating point division. The result of integer division is always an integer. Integer division determines how many times one integer goes into another.

 

 

6. What is a magic number? Why are magic numbers problematic?

Ans. A magic number is a numeric literal (for example, 8080 , 2048 ) that is used in the middle of a block of code without explanation. It is considered bad practice to use magic numbers because: A number in isolation can be difficult for other programmers to understand.