Please Subscribe My YouTube Channel

Saturday, January 07, 2023

IOT Important Point For O level Exam

                                    M4R5 IOT

• IOT का पूरा नाम क्या है – इन्टरनेट ऑफ़ थिंग्स (Internet Of Things)
• IOT में थिंग्स का क्या मतलब किससे है – बस्तुओं से (वह सभी बस्तुये जो ऑन और ऑफ टेक्निक का प्रयोग करती है.
• इन्टरनेट को क्लाउड भी कहा जाता है – सत्य
• IOT क्या है – नेटवर्क और सेंसर से जुडी हुई बस्तुये.
• आई ओ टी की खोज किसने की – केविन आस्थन ने 1999 में
• IOT उपकरण डेटा को कलेक्ट करने व शेयर करने के लिए किसका उपयोग करते है – इन्टरनेट का
• IOT में किसका होना अनिवार्य है – माइक्रो कंट्रोलर
• IOT में किस टेक्नोलॉजी का प्रयोग किया जाता है- वायरलेस तकनीक का
• क्या इन्टरनेट ऑफ़ थिंग्स पूरी तरह से सेफ है – नहीं
• IOT के प्लेटफॉर्म कौन से है – AWS, माइक्रोसॉफ्ट अजुरे, सेल्सफ़ोर्स, आदि.
• IOT के फंडामेंटल कॉम्पोनेन्ट कौन से है – सेंसर, कनेक्टिविटी, डाटा प्रोसेसिंग और यूजर इंटरफ़ेस.
• IOT में वायरलेस कनेक्शन के लिए किस लेयर का प्रयोग किया जाता है – डाटा link लेयर
• IOT में पुश बटन क्या है – डिजिटल सेंसर
• IOT में किस लाइट सेंसर किस प्रकार का सेंसर है – एनालॉग सेंसर
•भौतिक दुनिया से डाटा को कैप्चर करने के लिए किस प्रकार की डिवाइस का प्रयोग किया जाता है – IOT डिवाइस का
•    Arduino Programming में सिंगल line कमेंट के लिए क्या करते है - //comment//


•    किसी भी कार्य को कण्ट्रोल करने के लिए माइक्रोकंट्रोलर और माइक्रो प्रोसेसर का प्रयोग किया जाता है – सत्य
•    अलेक्सा क्या है- एक Voice कंट्रोलर
•    BMP-280, DHT-11, Photoresistor क्या है – सेंसर
•    IOT में Actuator कौन से है – स्टॉपर मोटर,फैन, LED, etc.
•    IOT में Actuator का क्या कार्य है – इलेक्ट्रॉनिक सिग्नल को भौतिक सिग्नल में बदलने के लिए
•    IOT में Actuator को ऑपरेट होने के लिए किस सिग्नल की आवश्यकता होती है- एनालॉग सिग्नल
•    COAP कौन सी लेयर है – सर्विस लेयर
•    Ardunio कितने प्रकार के है – 8 (आठ)
•    I2C क्या है – Inter Integrated Communication (यह एक प्रोटोकॉल है)
•    IOT बेस्ड पहली डिवाइस कौन सी है – ATM
•    SCTP किस लेयर पर कार्य करता है – Transport Layer
•    Port Address, पता होस्ट पर एक प्रक्रिया की पहचान करता है – सत्य
•    ट्रांसपोर्ट लेयर का कार्य क्या है – मल्टीप्लेक्सिंग और डी मल्टीप्लेक्सिंग
•    ट्रांसपोर्ट लेयर किस रूप में डाटा प्राप्त करती है – बाइट स्ट्रीम के रूप में.
•    UDP कनेक्शन लेस प्रोटोकॉल है – सत्य
•    UDP का पूरा नाम क्या है – User Datagram Protocol
•    UDP क्या है – एक प्रोटोकॉल
•    TCP क्या है ?- यह कनेक्शन ओरिएंटेड प्रोटोकॉल है जिसका पूरा नाम ट्रांसमिशन कण्ट्रोल प्रोटोकॉल है.
•    IOT के लिए सबसे बेस्ट IP वर्जन है – IPV6
•    स्मार्ट grid आर्किटेक्चर में क्लाउड की क्या भूमिका है – डाटा को मैनेज करना.
•    Z-wave  क्या है – एक वायरलेस कम्युनिकेशन प्रोटोकॉल जिसका प्रयोग स्मार्ट होम नेटवर्किंग स्मार्ट डिवाइस को कनेक्ट करने में किया जाता है.
•    Zig-Bee क्या है – एक low power, low डाटा रेट वाला वायरलेस नेटवर्क.
•    Zig-Bee किस पर आधारित है – इलेक्ट्रिकल और इलेक्ट्रॉनिक्स इंजीनियर्स (IEEE) 802.15.4 मानक पर आधारित
•    BLE क्या है – Blutooth Low Energy नेटवर्क जो पर्सनल एरिया नेटवर्क के अन्तेर्गत आता है.


•    Respberry क्या है – एक प्रकार का कंप्यूटर
•    Respberry कंप्यूटर  में किस टेक्नोलॉजी का प्रयोग किया जाता है- ऑन बोर्ड wifi व ब्लूटूथ जैसी तकनीक का
•    IOT उपकरण में कौन –कौन से सेंसर प्रयोग किये जाते है- स्मोक सेंसर(धुआं सेंसर), प्रेसर या दाब सेंसर, टेम्परेचर या तापमान सेंसर, Motion डिटेक्शन सेंसर, प्रोक्सिमिटी सेंसर,BMP-280,DHT-11 आदि.
•    IOT में PWM क्या है – Pulse Width Modulation.
•    PWM का क्या कार्य है – DC मोटर की स्पीड व डिमिंग लाइट को कण्ट्रोल करना
•    बोट नेट किस प्रकार के अटैक को लांच करता है – DDos
•    Arduino Programming में मोडुलो को कण्ट्रोल करने के लिए किस सिंबल का प्रयोग करते है - % (परसेंट का)
•    Arduino UNO प्रोटोटाइप बोर्ड में किस माइक्रो कंट्रोलर का प्रयोग किया जाता है – ATmega328P
•    ATmega328P में p का क्या मतलब है – pico-power
•    Arduino Programming  का डिफ़ॉल्ट मेथड क्या है - setup() और loop()
•    सबसे highest डाटा रेट कम्युनिकेशन किसमें होता है – ऑप्टिकल फाइबर केबल में.
•    Arduino  का डिफ़ॉल्ट बूट लोडर क्या है – Optiboot
•    Arduino IDE प्रोग्राम किस सॉफ्टवेर पर लिखे व अपलोड किये जाते है- स्केच (skech) पर
•    Arduino  में बूट लोडर को re-program करने के लिए किसका प्रयोग करते है – ICSP (In Circuit Serial Programming).
•    ICSP (In Circuit Serial Programming), यह फर्मवेयर प्रोग्राम करने के लिए एक प्रोग्रामिंग विधि है- सत्य
•    Arduino डिजाईन क्या है – एक प्रकार का ओपन सोर्स सॉफ्टवेर, जो एनालॉग और डिजिटल दोनों डाटा को पढ़ सकता है.
•    Arduino डिजाईन सॉफ्टवेर के पास कोई ऑपरेटिंग सिस्टम नही होता है क्योंकि फर्मवेयर सॉफ्टवेर इसमें पहले से प्रोग्राम किया होता है – सत्य
•    LED लाइट को कण्ट्रोल करने के लिए किस मोडूल का प्रयोग किया जाता है – Blootooth Module HC-05 का (जो स्मार्ट फ़ोन पर blootooth सिग्नल सेंड करता है)
•    IOT  प्लेटफॉर्म किससे जुड़ा है- सेंसर और डिवाइस से
•    IOT  प्लेटफॉर्म हार्डवेयर और सॉफ्टवेर को प्रोटोकॉल के द्वारा कण्ट्रोल करता है- सत्य
•    IOT में आउटपुट के लिए किसका प्रयोग किया जाता है – Actuator का

•    IETF का पूरा नाम क्या है – Internet Engineering Task Force
•    AMQP क्या है – Advanced Message Queuing Protocol
•    CoAP का पूरा नाम क्या है –Constrained Application Protocol
•    LoRaWAN का पूरा नाम:- Long Range Wide Area Network (यह लाखो कम शक्ति वाले उपकरणों के साथ स्मार्ट शहरों के लिए Wan प्रोटोकॉल है.
•    GS1 क्या है – Global Standards One
•    O-DF क्या है – Open Data Format

•    NFC क्या है – Near Field Communication
एनएफसी में इलेक्ट्रॉनिक उपकरणों के लिए संचार प्रोटोकॉल होते हैं, आमतौर पर एक मोबाइल डिवाइस और एक मानक डिवाइस का प्रयोग करता है।
•    RFID क्या है – रेडियो फ्रीक्वेंसी आइडेंटिफिकेशन
RFID तकनीक वस्तुओं से जुड़े टैग को पहचानने और ट्रैक करने के लिए तथा 2-वे रेडियो ट्रांसमीटर-रिसीवर का उपयोग करती है।
•    
•    Low-Energy Wireless (LEW) - यह तकनीक एक IoT सिस्टम के सबसे अधिक शक्ति वाले पहलू की जगह लेती है। हालांकि सेंसर और अन्य तत्व लंबे समय तक बंद हो सकते हैं।
•    रेडियो प्रोटोकॉल - ZigBee, Z-Wave, and Thread are radio protocols for creating low-rate private area networks.
•    Types of Sensor:- accelerometers, temperature sensors, magnetometers, proximity sensors, gyroscopes, image sensors, acoustic sensors, light sensors, pressure sensors, gas RFID sensors, humidity sensors , micro flow sensors
•    6LoWPAN - यह लो-पावर वायरलेस पर्सनल एरिया नेटवर्क पर IPv6 के लिए है। यह सीमित संसाधनों वाले उपकरणों द्वारा आवश्यक कम डेटा दर वायरलेस का समर्थन करने के लिए संपीड़न तकनीक प्रदान करता है।
•    RPL-  यह  कम-शक्ति और हानिपूर्ण नेटवर्क) के लिए यह डिस्टेंस वेक्टर आईपीवी 6 प्रोटोकॉल है जो विभिन्न क्षमता वाले उपकरणों के जटिल नेटवर्क में सर्वोत्तम संभव पथ खोजने की अनुमति देता है।
•    LLNs क्या है -  Low-Power And Lossy Networks
•    IoT सिस्टम के बिल्डिंग ब्लाक  में क्या आवश्यक है - चार चीजें ( सेंसर, प्रोसेसर, गेटवे, एप्लिकेशन)

सेंसर:- ये IoT उपकरणों का फ्रंट एंड बनाते हैं। उनका मुख्य उद्देश्य वे रीयल-टाइम डेटा एकत्र करना या इसके आसपास (एक्ट्यूएटर्स) को डेटा देना है।
प्रोसेसर:- यह  IoT सिस्टम का दिमाग हैं, यह डेटा को इंटेलिजेंस देता है। उनका मुख्य कार्य सेंसर द्वारा कैप्चर किए गए डेटा को संसाधित करना ताकि भारी मात्रा में एकत्र किए गए कच्चे डेटा से मूल्यवान डेटा निकाला जा सके। प्रोसेसर ज्यादातर रीयल-टाइम आधार पर काम करते हैं और इन्हें एप्लिकेशन द्वारा आसानी से नियंत्रित किया जा सकता है। ये डेटा को सुरक्षित(एन्क्रिप्शन और डिक्रिप्शन) करने के लिए भी जिम्मेदार हैं.
गेटवे:- गेटवे डेटा के संचार में मदद करता है। यह संसाधित डेटा को रूट करने उचित उपयोग के लिए उचित स्थानों पर भेजने के लिए जिम्मेदार हैं। यह डेटा को नेटवर्क कनेक्टिविटी प्रदान करता है। LAN, WAN, PAN, आदि नेटवर्क गेटवे के उदाहरण हैं।
एप्लिकेशन:- यह IoT सिस्टम का दूसरा एंड बनाते हैं। एकत्र किए गए सभी डेटा के समुचित उपयोग के लिए application आवश्यक हैं। एप्लिकेशन उपयोगकर्ताओं द्वारा नियंत्रित होते, जिसके उदाहरन: होम ऑटोमेशन ऐप, सुरक्षा प्रणाली, औद्योगिक नियंत्रण केंद्र आदि हैं।

Author Satyam Trivedi 
 
Python

10 Python Programs for Practical and Project

Python Programs


1.Python Program to Calculate Grade of a Student

This is a Python Program to take in the marks of 5 subjects and display the grade.

Problem Description:- The program takes in the marks of 5 subjects and displays the grade.

Problem Solution (Algorithm)

1. Take in the marks of 5 subjects from the user and store it in different variables.
2. Find the average of the marks.
3. Use an else condition to decide the grade based on the average of the marks.
4. Exit.

Program/Source Code

Here is source code of the Python Program to take in the marks of 5 subjects and display the grade. The program output is also shown below.

 

sub1=int(input("Enter marks of the first subject: "))

sub2=int(input("Enter marks of the second subject: "))

sub3=int(input("Enter marks of the third subject: "))

sub4=int(input("Enter marks of the fourth subject: "))

sub5=int(input("Enter marks of the fifth subject: "))

avg=(sub1+sub2+sub3+sub4+sub4)/5

if(avg>=90):

    print("Grade: A")

elif(avg>=80&avg<90):

    print("Grade: B")

elif(avg>=70&avg<80):

    print("Grade: C")

elif(avg>=60&avg<70):

    print("Grade: D")

else:

    print("Grade: F")

 

Program Explanation

1. User must enter 5 different values and store it in separate variables.
2. Then sum up all the five marks and divide by 5 to find the average of the marks.
3. If the average is greater than 90, “Grade: A” is printed.
4. If the average is in between 80 and 90, “Grade: B” is printed.
5. If the average is in between 70 and 80, “Grade: C” is printed.
6. If the average is in between 60 and 70, “Grade: D” is printed.
7. If the average is anything below 60, “Grade: F” is printed.

 

2.Python Program to Check Prime Number

This is a Python Program to check if a number is a prime number.

Problem Description

The program takes in a number and checks if it is a prime number.

Problem Solution

1. Take in the number to be checked and store it in a variable.
2. Initialize the count variable to 0.
3. Let the for loop range from 2 to half of the number (excluding 1 and the number itself).
4. Then find the number of divisors using the if statement and increment the count variable each time.
5. If the number of divisors is lesser than or equal to 0, the number is prime.
6. Print the final result.
5. Exit.

Program/Source Code

Here is source code of the Python Program to check if a number is a prime number. The program output is also shown below.

a=int(input("Enter number: "))

k=0

for i in range(2,a//2+1):

    if(a%i==0):

        k=k+1

if(k<=0):

    print("Number is prime")

else:

    print("Number isn't prime")

Program Explanation

1.      User must enter the number to be checked and store it in a different variable.
2. The count variable is first initialized to 0.
3. The for loop ranges from 2 to the half of the number so 1 and the number itself aren’t counted as divisors.
4. The if statement then checks for the divisors of the number if the remainder is equal to 0.
5. The count variable counts the number of divisors and if the count is lesser or equal to 0, the number is a prime number.
6. If the count is greater than 0, the number isn’t prime.
7. The final result is printed.

 

 

3.Python Program to Check Armstrong Number

This is a Python Program to check if a number is an Armstrong number.

Problem Description

The program takes a number and checks if it is an Armstrong number.

Problem Solution

1. Take in an integer and store it in a variable.
2. Convert each digit of the number to a string variable and store it in a list.
3. Then cube each of the digits and store it in another list.
4. Find the sum of the cube of digits in the list and check if it is equal to the original number.
5. Print the final result.
6. Exit.

Program/Source Code

Here is source code of the Python Program to check if a number is an Armstrong number. The program output is also shown below.

 

n=int(input("Enter any number: "))

a=list(map(int,str(n)))

b=list(map(lambda x:x**3,a))

if(sum(b)==n):

    print("The number is an armstrong number. ")

else:

    print("The number isn't an arsmtrong number. ")

Program Explanation

1.      User must enter the number and store it in a variable.
2. The map function obtains each digit from the number and converts it to a string and stores it in a list.
3. The second map function cubes each digit and stores it in another list.
4. Then the sum of the cubes of the digits is found and is checked if it is equal to the original number.
5. If the sum of the cube of digits is equal to the original number, the number is an Armstrong number.
6. The final result is printed.

4.Python Program to Check Whether a Given Number is Perfect Number

2.      This is a Python Program to check if a number is a Perfect number.

3.      Problem Description

4.      The program takes a number and checks if it is a Perfect number.

5.      Problem Solution

6.      1. Take in an integer and store it in a variable.
2. Initialize a variable to count the sum of the proper divisors to 0.
3. Use a for loop and an if statement to add the proper divisors of the integer to the sum variable.
4. Check if the sum of the proper divisors of the number is equal to the variable.
5. Print the final result.
6. Exit.

7.      Program/Source Code

8.      Here is source code of the Python Program to check if a number is a Perfect number. The program output is also shown below.

9.   

10.n = int(input("Enter any number: "))

11.sum1 = 0

12.for i in range(1, n):

13.    if(n % i == 0):

14.        sum1 = sum1 + i

15.if (sum1 == n):

16.    print("The number is a Perfect number!")

17.else:

18.    print("The number is not a Perfect number!")

19.  Program Explanation

20.  1. User must enter the number and store it in a variable.
2. Use a for loop to generate numbers from 1 to n (where n is not included as we need the sum of the proper divisors of the number).
3. Using an if statement check if the number divided by i gives the remainder as 0 which is basically the proper divisor of the integer.
4. Then the proper divisors of the number are added to the sum variable.
5. If the sum of the proper divisors of the number is equal to the original number, tje number is a Perfect number.
6. The final result is printed.

 

 

5.Python Program to Print Table of a Given Number

 

This is a Python Program to print the table of a given number.

Problem Description

The program takes in a number and prints the table of a given number.

Problem Solution

1. Take in a number and store it in a variable.
2. Print the multiplication tables of a given number.
3. Exit.

Program/Source Code

Here is source code of the Python Program to print the table of a given number. The program output is also shown below.

 

n=int(input("Enter the number to print the tables for:"))

for i in range(1,11):

    print(n,"x",i,"=",n*i)

Program Explanation

1. User must enter a number.
2. Using a print statement, print the multiplication tables of the given number.

Runtime Test Cases

 

Case 1:

Enter the number to print the tables for:7

7 x 1 = 7

7 x 2 = 14

7 x 3 = 21

7 x 4 = 28

7 x 5 = 35

7 x 6 = 42

7 x 7 = 49

7 x 8 = 56

7 x 9 = 63

7 x 10 = 70

 

Case 2:

Enter the number to print the tables for:17

17 x 1 = 17

17 x 2 = 34

17 x 3 = 51

17 x 4 = 68

17 x 5 = 85

17 x 6 = 102

17 x 7 = 119

17 x 8 = 136

17 x 9 = 153

17 x 10 = 170

 

 

6.Sum of Digits Program in Python

This is a Python Program to find the sum of digits in a number.

Problem Description

The program takes in a number and finds the sum of digits in a number.

Problem Solution

1. Take the value of the integer and store in a variable.
2. Using a while loop, get each digit of the number and add the digits to a variable.
3. Print the sum of the digits of the number.
4. Exit.

Program/Source Code

Here is the source code of the Python Program to find the sum of digits in a number. The program output is also shown below.

 

n=int(input("Enter a number:"))

tot=0

while(n>0):

    dig=n%10

    tot=tot+dig

    n=n//10

print("The total sum of digits is:",tot)

Program Explanation

1. User must first enter the value and store it in a variable.
2. The while loop is used and the last digit of the number is obtained by using the modulus operator.
3. The digit is added to another variable each time the loop is executed.
4. This loop terminates when the value of the number is 0.
5. The total sum of the number is then printed.

Runtime Test Cases

 

Case 1:

Enter a number:1892

The total sum of digits is: 20

 

Case 2:

Enter a number:157

The total sum of digits is: 13

 

 

 

7.Python Program to Print All Odd Numbers in a Range

 

This is a Python Program to print odd numbers within a given range.

Problem Description

The program takes the upper and lower limit and prints all odd numbers within a given range.

Problem Solution

1. Take in the upper range limit and the lower range limit and store it in separate variables.
2. Use a for-loop ranging from the lower range to the upper range limit.
3. Then use an if statement if check whether the number is odd or not and print the number.
4. Exit.

Program/Source Code

Here is the source code of the Python Programto print odd numbers within a given range. The program output is also shown below.

 

lower=int(input("Enter the lower limit for the range:"))

upper=int(input("Enter the upper limit for the range:"))

for i in range(lower,upper+1):

    if(i%2!=0):

        print(i)

Program Explanation

1. User must enter the upper range limit and the lower range limit.
2. The for loop ranges from the lower range limit to the upper range limit.
3. The expression within the if-statement checks if the remainder obtained when the number divided by 2 is one or not (using the % operator).
4. If the remainder isn’t equal to 0, the number is odd and hence the number is printed.

Runtime Test Cases

 

Case 1:

Enter the lower limit for the range:1

Enter the upper limit for the range:16

1

3

5

7

9

11

13

15

 

Case 2:

Enter the lower limit for the range:150

Enter the upper limit for the range:180

151

153

155

157

159

161

163

165

167

169

171

173

175

177

179

 

 

8.Python Program to Check Whether a given Year is a Leap Year

This is a Python Program to check whether a given year is a leap year or not.

Problem Description

The program takes in a year and checks whether it is a leap year or not.

Problem Solution

1. Take the value of the year as input
2. Using an if-statement, check whether the year is a leap year or not
3. Print the final result
4. Exit

Program/Source Code

Here is source code of the Python Program to Calculate the Average of Numbers in a Given List. The program output is also shown below.

 

year=int(input("Enter year to be checked:"))

if(year%4==0 and year%100!=0 or year%400==0):

    print("The year is a leap year!")

else:

    print("The year isn't a leap year!")

Program Explanation

1. User must first enter the year to be checked.
2. The if statement checks if the year is a multiple of 4 but isn’t a multiple of 100 or if it is a multiple of 400 (not every year that is a multiple of 4 is a leap year).
3. Then the result is printed.

Runtime Test Cases

 

Case 1:

Enter year to be checked:2016

The year is a leap year!

 

 

Case 2:

Enter year to be checked:2005

The year isn't a leap year!

 

 

9. Python Program to Find the LCM of Two Numbers

This is a Python Program to find the LCM of two numbers.

Problem Description

The program takes two numbers and prints the LCM of two numbers.

Problem Solution

1. Take in both the integers and store it in separate variables.
2. Find which of the integer among the two is smaller and store it in a separate variable.
3. Use a while loop whose condition is always True until break is used.
4. Use an if statement to check if both the numbers are divisible by the minimum number and increment otherwise.
5. Print the final LCM.
6. Exit.

Program/Source Code

Here is source code of the Python Program to find the LCM of two numbers. The program output is also shown below.

a=int(input("Enter the first number:"))

b=int(input("Enter the second number:"))

if(a>b):

    min1=a

else:

    min1=b

while(1):

    if(min1%a==0 and min1%b==0):

        print("LCM is:",min1)

        break

    min1=min1+1

Program Explanation

1. User must enter both the numbers and store it in separate variables.
2. An if statement is used to find out which of the numbers is smaller and store in a minimum variable.
3. Then a while loop is used whose condition is always true (or 1) unless break is used.
4. Then an if statement within the loop is used to check whether the value in the minimum variable is divisible by both the numbers.
5. If it is divisible, break statement breaks out of the loop.
6. If it is not divisible, the value in the minimum variable is incremented.
7. The final LCM is printed.

 

10. Python Program to Find the GCD of Two Numbers

This is a Python Program to find the GCD of two numbers.

Problem Description

The program takes two numbers and prints the GCD of two numbers.

Problem Solution

1. Import the fractions module.
2. Take in both the integers and store it in separate variables.
3. Use the in-built function to find the GCD of both the numbers.
4. Print the GCD.
5. Exit.

Program/Source Code

Here is source code of the Python Program to find the GCD of two numbers. The program output is also shown below.

import fractions

a=int(input("Enter the first number:"))

b=int(input("Enter the second number:"))

print("The GCD of the two numbers is",fractions.gcd(a,b))

Program Explanation

1. Import the fractions module.
2. User must enter both the numbers and store it in separate variables.
3. The in-built function of fractions.gcd(a,b) is used where a and b are the variables containing the integer values.
4. The final GCD is printed.

Runtime Test Cases

 

Case 1:

Enter the first number:15

Enter the second number:5

The GCD of the two numbers is 5

 

Case 2:

Enter the first number:105

Enter the second number:222

The GCD of the two numbers is 3

 

Python Notes     Web Desigining Notes