Tuesday 23 June 2020

20 - Python Question Discussion - 03


What is the output of the following program? Explain It.

def fun (n):

        if (n>100):

               return n-5

        return fun(fun(n+11))

print(fun(45))



(A)   50

(B)   100

(C)   74

(D)   Infinite Loop 


Explanation 

This is a recursive function(a function which call itself). So we should care about function calling and return values. Each time it return values as follows and final answer is 100. 


 

7.2 - PARTS OF SPEECH PART - 02


LESSON NO. 7.2

PARTS OF SPEECH

PART - 02

4. Adjective


Definition:  

We created words like good, tall, hopeless, ugly, bad, tall, strong, etc for denoting the qualities of persons, places, or things. These words are called adjectives.

An adjective qualifies a noun or pronoun. It is a word used to add something to the meaning of a noun or a pronoun:

Examples:

1.      The blue sky looks attractive. (Attributive Adjective)

2.      The angry sea scares us. (Attributive Adjective)

3.      I bought all the tickets available. (Attributive adjective qualifying the noun tickets.)

4.      The sky is blue. (Predicative Adjective)

5.      I saw him laughing. (Present Participle as an attributive adj. qualifying the pronoun ‘him.’)

 Three articles (a, an, the) too are adjectives as they qualify nouns.

5. Adverb


Definition:  

Some words like quickly, seriously, furtively, dishonestly, correctly, hard, etc. modify actions or adjectives. These words are called adverbs.

An adverb modifies a verb, adjective, or another adverb: 

Examples:

1.      He works speedily. (modifies a verb)

2.      You are very kind. (Modifies an adjective, `kind.’)

3.      He behaved extraordinarily badly towards me. (modifies the adverb badly)

Modifications of a verb, adjective or adverb can be inferred from the context of the sentence as in sentences 2 and 3. ‘very’ modifies the adjective ‘kind’, and ‘extraordinarily’ modifies another the adverb ‘badly’.

N.B.: In a few instances an adverb can be used as a noun also. It means that in such cases the adverb is placed after a preposition and performs the function of a noun because a preposition governs a noun or pronoun. 

Examples:

1.      The ‘ups’ and ‘downs’ of life.  (Adverbs acting as Nouns.)

2.      I have not met him since then. (Here, ‘Since’ is a preposition governing ‘then’ which, in this sentence is an ‘adverb’ acting as a ‘noun.’

3.      I will follow his instructions from now. (From is a preposition and now is an adverb which is acting as a noun in this sentence.

6. Preposition


Definition:  

Some words as in, out, from, at, on, etc. were created for making phrases. A phrase is a group of words that acts as a single part of speech.

Example:  

I met him in Delhi. (in Delhi is a phrase – an adverb phrase-, and it acts as an adverb)

A preposition governs a noun or pronoun. It introduces a phrase and is said to govern the noun or pronoun in that phrase. It shows the relation of that noun or pronoun with some other word or words in the sentence: 

Examples:

1.      I saw a dog in your garden.

2.      Ravi is fond of tea.

3.      He sat under the tree.

4.      The timetable is subject to change. (the preposition governs the noun ‘change’.)

7. Conjunction

 

Definition:  

A conjunction is a joining word.

(A)   Simple:  

It links together words (e.g. two nouns, two prepositions, and two phrases); and, but, or are the chief examples.

Example: 

Ravi and Rakesh play cricket. Nothing but hard work matters. Give me a pen or pencil. ‘to’ and ‘fro’, ‘in’ and ‘out’

(B)   Coordinating:  

It joins together clauses that have the same rank and function in a sentence; and, but, or are the chief examples.

Examples: 

1.      I played, and Amit sang in that ground.          

2.      I reached there on time, but you never came.

3.      I shall go, or he will protest against my presence.

(C)    Subordinating:  

It joins a dependent clause to the clause on which it is dependent; if, when, till, where, although, before, and after are the chief examples.

Example:  

You are wrong if you think so.

8. Interjection

                                           

Definition:  

Interjections are words that are used to call the attention of the person addressed (Hello!, Well!, Listen!), or to express a feeling of joy, grief, or surprise (e.g. Hurrah! Alas! Ha!)

1.      Hello! Your pen is here.

2.      Hurrah! We have won.

Interjections are single words. Groups of words such as ‘How awful!’ are not interjections, but elliptical exclamatory sentences, the subject and a part of the predicate not being expressed. The full form of ‘How awful’ is:  How awful it is!

Come! Hark! also are not interjections. They are complete sentences with their subjects not expressed.

Note:  A given word can perform more than one function, and it may belong to more than one part of speech according to the function it does in a particular sentence: 

ROUND

1.      Radha has a round face. (Adjective)

2.      His action was roundly condemned. (Adverb)

3.      Ravi rounded his lips. (Verb)

4.      We sat round the table (Preposition governing a noun the table)

5.      Ravi turned round (Adverb modifying verb turned)

6.      The principal takes a round at 7.00 a.m. (noun)

 

 


Sunday 21 June 2020

Web Designing Test Result 21 June 2020


Web Designing Test Result 21 June 2020
Name Marks Rank
Rajkumar Gupta 37 1
Govil Singla 35 2
Manu Choudhary 35 2
Poonam Kashyap 33 4
Nitin Sharma 33 4
Kirti 31 6
Poonam Yadav 30 7
Gaurav Kumar 30 7
Lovely 30 7
Nancy 28 10
Yamini Choudhary 28 10
Garima Batra 27 12
Shubham 27 12
Meera Yadav 27 12
Aarti 27 12
Aman Singh 27 12
Sheetal Tanwar 27 12
Preeti 27 12
Sachin 27 12
Sandhya 26 20
Sonam 26 20
Priyanka Soni 26 20
Sonika 25 23
Jyoti Malik 25 23
Vaishali 25 23
Surya 25 23
Manoj Kumar 24 27
Priya Chaurasia 24 27
Suman 22 29
Ankur Bhardwaj 21 30
Vibhakar 21 30
Manasi Adhikary 21 30
Sushmita 20 33
Shivani 20 33
Salvi 19 35
Sandeep Chauhan 19 35
Sonia 19 35
Sana 18 38
Mittu Sharma 17 39
Kalyani 17 39
Rashmika Kataria 16 41
Naveen Mittal 15 42
Harish Singh 15 42
Umesh Kumar 14 44
Sweety 12 45
Hemant Kumar Singh 12 45
Khushbu Sharma 12 45

10- June GK Statewise Scheduled Tribes List

◼Statewise Scheduled Tribes List ◼

StateTribes

🐠Andhra pradesh

🦋Andh And Sadhu Andh, Bhil, Bhaghata, Dhulia,rona, Kolam, Gond, Thoti, Goundu, Kammara, Savaras, Dabba Yerukula, Sugalis, Nakkala, Pardhan, Gadabas, Chenchus A.k.a Chenchawar, Kattunayakan, Jatapus, Manna Dhora


🐠Arunachal Pradesh

🦋Singpho, Dafla, Momba, Abor, Sherdkpen, Galong, Apatanis

🐠Assam

🦋Khasis, Chakma, Dimasa, Gangte, Garos, Hajong, Chutiya


🐠Bihar

🦋Gond, Birjia, Asur, Savar, Parhaiya, Chero, Birhor, Santhals, Baiga

 
🐠Chhattisgarh

🦋Nagasia, Biar, Khond, Agariya, Bhattra, Mawasi, Bhaina,
 

🐠Goa

🦋Varli, Dubia, Siddi, Dhodia, Naikda


🐠Gujarat
🦋Patelia, Bhil, Dhodia, Bamcha, Barda, Paradhi, Charan, Gamta

🐠Himachal Pradesh
🦋Swangal, Gujjars, Lahaulas, Khas, Pangwala, Lamba, Gaddis by Aso ebooks team

🐠Jammu and Kashmir

🦋Balti, Garra, Sippi, Bakarwal, Mon, Gaddi, Purigpa, Beda

🐠Jharkhand

🦋Gonds, Birhors, Savar, Mundas, Santhals, Khaira, Bhumji  by Aso ebooks team 

🐠Karnataka

🦋Gond, Patelia, Barda, Yerava, Bhil, Koraga, Adiyan, Iruliga,

🐠Kerala
🦋Malai, Aarayan, Arandan, Uralis, Kurumbas, Arandan, Eranvallan


🐠Madhya Pradesh
🦋Kharia, Bhils, Murias, Birhors, Baigas, Katkari, Kol, Bharia, Khond, Gonds, by Aso ebooks 

🐠Maharashtra
🦋Warlis, Khond, Bhaina, Katkari, Bhunjia, Rathawa,

19-Python MCQ - 2

What will be the output generated by the following snippet?

a=[5,10,15,20,25]

k=1

i=a[1]+1

j=a[2]+1

m=a[k+1]

print(i,j,m)

(i)            11  15  16

(ii)          11  16  15

(iii)       11  15  15

(iv)       16  11  15



i=a[1]+1 hai
a[1] means a name ki jo list hai uska 2nd element because list me element ki index 0 se start hoti hai so index 1 ka matlab 2nd index hoga

2nd index par 10 likha hai

so i=10+1=11 hoga

j=a[2]+1 hai a[2] means 3rd element so

j=15+1=16 hoga

m=a[k+1]

k ki value 1 di hui hai so

m=a[1+1]
m=a[2]  means 3rd element 
so m=15 hoga

so final ans 11 16 15 yani b wala option sahi hai

18 - Python MCQ-1


What is the output of the following?

x=123

for i in x:

  print(i)

 

(i)                        1  2  3

(ii)                   123

(iii)              Error



x=123

hai yaha x ek integer type ka variable hai and for each loop is tarah ka aise objects par kaam karta hai jisme iteration ho means 2 se jyada values ho jaise list, tuple etc.

so x ke liye ham for i in x wala loop nahi chala sakte isme error hai

so ans error hoga

 

isko agar ham

x=(123,)

karke likh de to ab ye tuple ban gya hai tuple me 1 element likhne ke liye uske baad me comma laga do, tuple ko ya to small bracket me likhte hai ya bina bracket ke but kam se kam 1 comma jarur hona chahiye

so

x=123,

ya

x=(123,)

likhne se ye tuple ban jayega jisme 1 element hoga

fir ans (ii) wala hoga 123

 

or agar ham yaha

x=[123] likh de to ye list ban jayega and list ko bade bracket me likhte hai

list par bhi iteration ka loop chal jayega

so ans tab bhi (ii) wala yani 123 aayega 

Friday 19 June 2020

7.1 - PARTS OF SPEECH PART - 1

LESSON NO. 7

PARTS OF SPEECH

 


Last two lines: “how to know the sorts of words one from another.”

-William Corbbett in a letter to his son, in the year 1823.

 

THE TERM “SORTS OF WORDS” MEANS “PARTS OF SPEECH.”

Parts of Speech

Introduction

Grammar is usually divided into two parts: accidence – also called morphology – i.e. the doctrine of all forms (including inflexions) of the words of a language, and syntax, i.e. the use of the forms (of words) for making sentences.

Human beings have given names to everything. All persons, places, things (Ravi, India, tree, pen); qualities (strong, tall, long, good); manners (quickly, rarely, definitely); actions (run, jump, laugh, lift); joining words (and, but, or) are names. These forms/names (accidence) have inflections too (Ravi = Ravi’s, he = his, it = its, etc. ) These names have been divided into the parts of speech according to their functions (syntax).

 

Parts of Speech


There are eight parts of speech as given below:

1.      Noun   

2.      Pronoun           

3.      Verb                

4.      Adjective       

5.      Adverb            

6.      Preposition      

7.      Conjunction    

8.      Interjection

1.    Noun

Definition:  The names given by us to persons, places, or things are called nouns: 

Examples:

1.      Ravi is a teacher.        

2.      Delhi is a famous city.

3.      This rose is beautiful.  

4.      His determination is commendable.

Note:  The word thing includes: 

1.      All objects that we can see, hear, taste, touch, or smell.

e.g. The sky, sound, heat, etc.

2.      Something that we can think of, but can’t perceive by senses, e.g. Youth, love, discussion.

 

2.    Pronoun

Definition:  Pronouns are words that are used instead of nouns. They are used for the avoidance of noun repetition. They are called noun-equivalents also: 

Examples:

1.      Ravi is happy because he received the first prize yesterday.

We use pronouns also for mentioning persons or things without naming them: 

2.      This is a good pen.

3.      Anyone can see that he is unwell.

 

3.    Verb


Definition:  

We created words for denoting actions (play, sing, throw, drink) and conditions (is, am, are). These words are called verbs.

Verb (Finite):  

It is a word whose function is predication, expressing the action done by, or the state of, the subject: 

Examples:

1.      Boys dance. (The verb predicates by telling the action of the subject.)

2.      Ravi bought a pen yesterday. (The verb predicates by telling the action and the object on which the action passes. (The next word, yesterday, modifies the action.)

3.      Radha is a teacher. (The verb predicates by stating the condition of the subject and completes the sense of the verb with the help of the complement, namely a teacher.)

 Infinite:  

It is a word that acts as an adjective, adverb, or noun in a phrase, or acts as the subject, object, or complement in a sentence: 

Examples:

1.      I saw him laughing   (Adj).

2.      I saw Ravi laughing loudly. (Adj. in an adj. phrase).

3.      He comes to sing in the morning. (Adverb phrase).

4.      Ravi came to dance (Adverb phrase)

5.      His job is to sing (Noun phrase)

6.      My job is to teach you sincerely. (Noun in a noun phrase).

In the aforesaid sentences, the words following the infinite verbs (in bold letters) create a phrase by combining themselves with the infinitive verbs, and they become a part of the phrase that the infinite verbs introduce. See also the box below:

7.      Seeing is believing. (Seeing is subject & believing is complement)

8.      I hate singing. (Direct object of the verb)

THE WORDS IN BOLD LETTERS ABOVE ARE “INFINITIVE VERBS.”


Tuesday 16 June 2020

17 - Difference between anti-join and semi-join

Difference Between Anti-Join and Semi-Join

While a semi-join returns one copy of each row in the first table for which at least one match is found, an anti-join returns one copy of each row in the first table for which no match is found.

Oracle Semi Join

·        Semi-join is introduced in Oracle 8.0. It provides an efficient method of performing a WHERE EXISTS sub-query.

·        A semi-join returns one copy of each row in first table for which at least one match is found.

·        Semi-joins are written using the EXISTS clause

DEPT Table

CREATE TABLE ”DEPT"   

   (    

"D_ID" NUMBER(10,0) NOT NULL PRIMARY KEY,   

 "D_NAME" VARCHAR2(50) NOT NULL

   )                                          

D_ID

D_NAME

1

A

2

B

3

C

4

d

 

EMP Table

CREATE TABLE  "EMP"   

   (   

 "E_ID" NUMBER,   

 "F_NAME" VARCHAR2(4000),   

"L_NAME" VARCHAR2(4000),   

 "D_ID" NUMBER  

   )  

E_ID

F_NAME

L_NAME

D_ID

1

Ram

Kumar

-

2

Raj

Verma

-

3

Sam

Sharma

-

4

John

Yadav

-

10

Amit

Sharma

1

 

Execute this query

SELECT   d.d_id, d.d_name  

        FROM     dept AS d

        WHERE    EXISTS  

                 (  

                 SELECT 1  

                 FROM   emp AS e

                 WHERE e.d_id = d.d_id  

                 )  

        ORDER BY d.d_id;  

Result

D_ID

D_NAME

1

A

 

Result only from Left Table when subquery result minimum one row i.e. exists will be true.

 

Oracle Anti Join

·        Anti-join is used to make the queries run faster. It is a very powerful SQL construct Oracle offers for faster queries.

·        Anti-join between two tables returns rows from the first table where no matches are found in the second table. It is opposite of a semi-join. An anti-join returns one copy of each row in the first table for which no match is found.

·        Anti-joins are written using the NOT EXISTS or NOT IN constructs.

 

Execute this query

SELECT   d.d_id, d.d_name  

        FROM     dept  

        WHERE    NOT EXISTS  

                 (  

                 SELECT 1  

                 FROM   emp as e

                 WHERE e.d_id = d.d_id  

                 )  

        ORDER BY d.d_id ;  

 

 

Result

D_ID

D_NAME

2

B

3

C

4

D

 

 

Result from left table which is not match in right table