Loading ...
SeekhoCoding
Python Syllabus Game Python Projects

Chapter 8 : Python Data Types (Practice Sets)

इस Web Page पर Python Data Types से संबंधित Practice sets Add किए गए है | Data के Type को Data Type कहा जाता है , इसलिए Python Language मे Projects Create करने के लिए Data Types बहुत HelpFul होते है | इस Web Page पर Data Types से संबंधित Practice Sets add करने का Purpose आपको Python Data Types के छोटे - से - छोटे Concept को समझाना है , इसलिए बिना किसी की Help के अभी दि गई Problems को Solve करे |

Problem 1 :

किसी अनजान व्यक्ति के घर पर आने पर पहले उससे उसका Name पूछते जाता है और फिर उस व्यक्ति का welcome किया जाता है |
नीचे दिए गए code editor मे एक Program लिखे जो ,

  1. User से User का Name ले और Name variable मे store करे |
  2. Welcome To You <Name> Print करो |

Python Loading...

Code Explanation

  1. Name = > Name एक variable है जो input मे user का Name store करता है |
  2. print() = > print() Function screen पर Name variable मे stored value को show करता है |

Problem 2 :

student Percentage मे result पता करने के लिए Total marks को Numbers of subject से devide करके Marks Average निकालता है |
नीचे दिए गए code editor मे एक Program लिखे जिसमे ,

  1. Marks List form मे store हो |
  2. Marks को calculate करके Average value निकाले |

Python Loading...

Code Explanation

  1. marks = [50, 60, 70, 80, 90] = > marks एक variable है जिसमे student के marks List के type मे stored है |
  2. average = sum(marks) / len(marks) = > average ए क variable है जि स मे marks की average value stored है |
  3. sum(marks) / len(marks) = > sum function stored सही marks का sum calculate करता है और len() function Numbers of Marks calculate करता है |
  4. print(average) = > ये print() average variable को print करता है |

Problem 3 :

College Result List मे Studens के Results student के Roll Number के According show होते है |
नीचे दिए गए code editor मे Tuple के उपयोग से एक Program लिखे जिसमे ,

  1. Tuple के Type मे कुछ names stored हो |
  2. Tuple मे index Number 2 पर stored value को show करे |

Python Loading...

Code Explanation

  1. names = ("Kamal" , "Deepak" , "Gopal") = > names एक variable है जिसमे student के names Tuple के type मे stored है |
  2. print(names[2]) = > ये print() screen पर names variable के index number 2 पर stored value को show करता है |

Problem 4 :

नीचे दिए गए code editor मे एक Program दिया गया है जो ,

  1. Input मे User से Age लेता है |
  2. User Age 18 से कम या equal होने पर "True" message show करता है |
  3. User Age 18 से अधिक होने पर "False" message show करता है |
लेकिन इस Code मे mistake है जिसके कारण Error आ रही है आपको Program को error free करना है |

Python Loading...

Code Explanation

  1. age = int(input("Enter Your Age : ")) = > age एक variable जो input मे User user की age store करता है |
  2. Result = age <= 18 = > दि गई condition के according Result result store करता है |

Problem 5 :

School मे students , Teacher Student से पूछते है की इस Word की Total lenght बताए |
नीचे दिए गए code editor मे एक Program लिखे जो ,

  1. Input मे Words ले |
  2. Words मे उपयोग किए गए Total Numbers , letters etc. count करे |
  3. Total lenght show करे |

Python Loading...

Code Explanation

  1. Words = input("Enter A Words : ") = > Words एक variable जो input मे User Words store करता है |
  2. lenght = len(sentence) = > lenght variable Words variable मे stored variables की Total lenght को store करता है |
  3. print(lenght) = > ये print() lenght variable को show करता है |

Problem 6 :

नीचे दिए गए code editor मे एक Python Code दिया गया है जो ,

  1. user से Input मे कोई एक Number लेता है |
  2. Number एक Even Number होने पर "True" show करता है |
  3. Number एक Even Number न होने पर "False" show करे |

लेकिन इस Code मे mistake है जिसके कारण Error आ रही है आपको Program को error free करना है |

Python Loading...

Code Explanation

  1. num = int(input("Enter Your Number : ")) = > num एक variable है जो input मे user कोई number value store करता है |
  2. result = num % 2 == 0 = > num variable मे stored number को 2 से devide करने के बाद बचा हुआ reminer 0 के बराबर होने पर ये condition true होते है |
  3. print(result) = > ये print() result variable को show करता है |

Problem 7 :

Company मे jobs पाने से पहले User से उसका experience पूछा जाता है |
नीचे दिए code editor मे एक code दिया गया है जो किसी variable मे stored value का type check करता है और variable के type को show करता है लेकिन Code मे error है आपको code से error को remove करना है और variable के type को पता करना है |

Python Loading...

Code Explanation

  1. name = "Kapil" = > name एक variable है जिसमे एक Name stored है |
  2. print(type(name)) = > ये print() name variable के type को show करता है |

Problem 8 :

नीचे दिए गए code editor मे एक Python Code लिखे जो ,
दो classes के common Students names को show करे |

Python Loading...

Code Explanation

  1. class6 , class7 = > दोनों variables मे Studens के Names store किए गए है |
  2. common_names = class6 & class7 = > common_names common names को store करता है |
  3. print(common_names = > ये print() function common_names variable को Show करता है |

Problem 9 :

Studens अपने Tests को Teacher के Bench पर एक Tests के नीचे एक - एक Test के नीचे एक और Teacher last वाले Test से Test checking start करता है | नीचे दिए गए code editor मे एक Python Code दिया गया है जिसमे ,

  1. एक List मे Students Marks stored है |
  2. List मे stored Marks को show किया गया है |

आपको Marks को Reverse करना है |

Python Loading...

Code Explanation

  1. numbers = [10, 20, 30, 40, 50] = > numbers एक variables है जिसमे Studens के Test marks store किए गए है |
  2. numbers.reverse() = > numbers variable मे stored marks को reverse किया गया है |
  3. print(numbers) = > ये print() function numbers variable को Show करता है |

Problem 10 :

जब भी किसी online plateform पर कोई order submit किया जाता है तो Customer और Product से related informations ली जाती है |
नीचे दिए गए code editor मे एक Python dictionary create करे जिसमे ,
Customer name , Brand name , location details stored हो |

Python Loading...

Code Explanation

  1. details = { = > details ए क variable जिसमे key और value मे Data Store किया गया है |
  2. print(details) = > ये print() function details variable को Show करता है |

You have completed This Chapter ! 🎉

Now you can choose any one of the following options to test your knowledge :

💻

Code Practice

Solve practical exercises .

Practice Now
🏆

Knowledge Test

Answer the questions of the chapter .

Start Test
📘

Next Chapter

Continue your Python journey by reading the next chapter.

Next Chapter
🆘

Help Center

Users and we all help you together .

Peer Learning
Expert Advice
Live Chat
Fast Solutions