Introduction to Python Programming
Computer Science · 10th Class (Matric Part 2) · BISE Sargodha
Tests for this chapter
Tests run in your chosen medium — the sample below shows both.
Full Book Test
40 questions · Operating Systems: Structure and Services × 5, System Recovery and Advanced Maintenance × 5, Introduction to Python Programming × 5, Control Structures in Python × 5, Introduction to Data Science × 5, Introduction to Artificial Intelligence and Machine Learning × 5, Applications of AI × 5, Digital Entrepreneurship × 5
Introduction to Python Programming Test
10 questions · Introduction to Python Programming × 10
Sample questions
Showing 20 of 150 questions from this chapter. The full bank is in the chapter test below.
- 1
Python is known as which type of programming language?
Python کس قسم کی پروگرامنگ زبان (Programming Language) کہلاتی ہے؟
- A.Assemblyاسمبلی (Assembly)
- B.High-level (correct answer)اعلیٰ سطحی (High-Level)
- C.Low-levelکم سطحی (Low-Level)
- D.Machine-levelمشین سطحی (Machine-Level)
Why: Python is a widely-used high-level programming language famous for its simplicity and readability.Python ایک وسیع پیمانے پر استعمال ہونے والی اعلیٰ سطحی (High-Level) پروگرامنگ زبان ہے جو اپنی سادگی اور پڑھنے میں آسانی کی وجہ سے مشہور ہے۔ - 2
Python is famous for its ______.
Python اپنی ______ کی وجہ سے مشہور ہے۔
- A.high speed and low memory useزیادہ رفتار اور کم میموری (Memory) کا استعمال
- B.complicated syntaxپیچیدہ نحو (Syntax)
- C.hardware controlہارڈویئر (Hardware) پر کنٹرول
- D.simplicity and readability (correct answer)سادگی اور پڑھنے میں آسانی
Why: Python's simplicity and readability make it ideal for both beginners and professionals.Python کی سادگی اور پڑھنے میں آسانی اسے ابتدائی اور ماہر دونوں طرح کے پروگرامرز کے لیے مثالی بناتی ہے۔ - 3
Python is a versatile language that can be applied to which fields?
Python ایک کثیر الاستعمال (Versatile) زبان ہے جسے کن شعبوں میں استعمال کیا جا سکتا ہے؟
- A.Only web developmentصرف ویب ڈیولپمنٹ (Web Development) میں
- B.Only game graphics designصرف گیم گرافکس ڈیزائن (Game Graphics Design) میں
- C.Only operating system kernelsصرف آپریٹنگ سسٹم (Operating System) کے کورنلز (Kernels) میں
- D.Web development, data analysis, and artificial intelligence (correct answer)ویب ڈیولپمنٹ، ڈیٹا تجزیہ (Data Analysis) اور مصنوعی ذہانت (Artificial Intelligence) میں
Why: Python is applicable to various fields, including web development, data analysis, and artificial intelligence.Python کا اطلاق مختلف شعبوں میں ہوتا ہے، جن میں ویب ڈیولپمنٹ، ڈیٹا تجزیہ اور مصنوعی ذہانت شامل ہیں۔ - 4
Computer programming is the process of ______.
کمپیوٹر پروگرامنگ (Computer Programming) ______ کا عمل ہے۔
- A.connecting computers to the internetکمپیوٹرز کو انٹرنیٹ سے جوڑنا
- B.selling software to customersصارفین کو سافٹ ویئر (Software) بیچنا
- C.creating a set of instructions that tell a computer how to perform a task (correct answer)ہدایات (Instructions) کا ایک مجموعہ تیار کرنا جو کمپیوٹر کو بتائے کہ کوئی کام کیسے انجام دینا ہے
- D.designing the physical parts of a computerکمپیوٹر کے جسمانی حصوں کو ڈیزائن (Design) کرنا
Why: Computer programming creates a set of instructions, written in a programming language, that the computer can understand and execute.کمپیوٹر پروگرامنگ میں پروگرامنگ زبان میں لکھی ہوئی ہدایات کا ایک مجموعہ تیار کیا جاتا ہے، جسے کمپیوٹر سمجھ کر چلا سکتا ہے۔ - 5
A development environment refers to ______.
ڈیولپمنٹ انوائرنمنٹ (Development Environment) سے کیا مراد ہے؟
- A.an internet connectionانٹرنیٹ کنکشن (Internet Connection)
- B.preparing a computer to write, run, and debug code effectively (correct answer)کمپیوٹر کو مؤثر طریقے سے کوڈ (Code) لکھنے، چلانے اور ڈیبگ (Debug) کرنے کے لیے تیار کرنا
- C.the physical monitor of a computerکمپیوٹر کا جسمانی مانیٹر (Monitor)
- D.a type of antivirus programاینٹی وائرس پروگرام کی ایک قسم
Why: Setting up a development environment involves installing and configuring the software, tools, and libraries needed for Python development.ڈیولپمنٹ انوائرنمنٹ قائم کرنے میں Python کی ڈیولپمنٹ کے لیے درکار سافٹ ویئر، ٹولز (Tools) اور لائبریریوں (Libraries) کو انسٹال (Install) اور ترتیب دینا شامل ہے۔ - 6
From which website can Python be downloaded?
Python کس ویب سائٹ سے ڈاؤن لوڈ کی جا سکتی ہے؟
- A.https://www.microsoft.com/
- B.https://www.google.com/
- C.https://www.openai.com/
- D.https://www.python.org/ (correct answer)
Why: Python is downloaded from the official website www.python.org, where the latest version is available.Python سرکاری ویب سائٹ www.python.org سے ڈاؤن لوڈ کی جاتی ہے، جہاں تازہ ترین ورژن (Version) دستیاب ہوتا ہے۔ - 7
Which checkbox should be selected while installing Python so that it can be run easily from the command line?
Python انسٹال کرتے وقت کون سا چیک باکس (Checkbox) منتخب کرنا چاہیے تاکہ اسے کمانڈ لائن (Command Line) سے آسانی سے چلایا جا سکے؟
- A.Remove PythonPython کو ہٹائیں
- B.Lock PythonPython کو مقفل کریں
- C.Add Python to PATH (correct answer)Python کو PATH میں شامل کریں
- D.Disable PythonPython کو غیر فعال کریں
Why: Checking "Add Python to PATH" during installation makes it easier to run Python from the command line.انسٹالیشن کے دوران "Python کو PATH میں شامل کریں (Add Python to PATH)" چیک کرنے سے کمانڈ لائن سے Python چلانا آسان ہو جاتا ہے۔ - 8
What is the benefit of checking "Add Python to PATH" during Python installation?
Python انسٹال کرتے وقت "Python کو PATH میں شامل کریں (Add Python to PATH)" چیک باکس منتخب کرنے کا کیا فائدہ ہے؟
- A.Comments are ignored automaticallyتبصرے (Comments) خود بخود نظر انداز ہو جاتے ہیں
- B.Python can be run easily from the command line (correct answer)Python کو کمانڈ لائن سے آسانی سے چلایا جا سکتا ہے
- C.Python runs twice as fastPython دوگنی رفتار سے چلتی ہے
- D.No IDE is ever neededکبھی کسی IDE کی ضرورت نہیں پڑتی
Why: Adding Python to PATH allows the Python command to be recognised and run easily from the command line.Python کو PATH میں شامل کرنے سے Python کمانڈ پہچانی جاتی ہے اور کمانڈ لائن سے آسانی سے چلائی جا سکتی ہے۔ - 9
Which version of Python is suggested to download from the Python website?
Python کی ویب سائٹ سے ڈاؤن لوڈ کرنے کے لیے کون سا ورژن (Version) تجویز کیا جاتا ہے؟
- A.Python 3.13.x (correct answer)
- B.Python 1.13
- C.Java 21
- D.Python 0.5
Why: The latest version of Python, for example Python 3.13.x, is downloaded from the Downloads section of python.org.Python کا تازہ ترین ورژن، مثلاً Python 3.13.x، python.org کے ڈاؤن لوڈ (Downloads) حصے سے ڈاؤن لوڈ کیا جاتا ہے۔ - 10
Python can be installed on which operating systems?
Python کن آپریٹنگ سسٹمز (Operating Systems) پر انسٹال کی جا سکتی ہے؟
- A.Only Androidصرف اینڈرائیڈ (Android)
- B.Only macOSصرف macOS
- C.Windows, macOS, and Linux (correct answer)Windows، macOS اور Linux
- D.Only Windowsصرف Windows
Why: Python installers are available for Windows, macOS, and Linux operating systems.Python کے انسٹالرز (Installers) Windows، macOS اور Linux آپریٹنگ سسٹمز کے لیے دستیاب ہیں۔ - 11
After downloading Python on Windows, which file is run to install it?
Windows پر Python ڈاؤن لوڈ کرنے کے بعد اسے انسٹال کرنے کے لیے کون سی فائل (File) چلائی جاتی ہے؟
- A.A .txt fileایک .txt فائل
- B.A .png fileایک .png فائل
- C.A .pdf fileایک .pdf فائل
- D.The downloaded .exe file (correct answer)ڈاؤن لوڈ شدہ .exe فائل
Why: On Windows, the downloaded .exe file is run to start the Python installation.Windows پر Python کی انسٹالیشن شروع کرنے کے لیے ڈاؤن لوڈ شدہ .exe فائل چلائی جاتی ہے۔ - 12
Which of the following is NOT an IDE used for Python development?
مندرجہ ذیل میں سے کون سا Python ڈیولپمنٹ کے لیے استعمال ہونے والا IDE نہیں ہے؟
- A.PyCharm
- B.VS Code
- C.IDLE
- D.Microsoft Word (correct answer)
Why: PyCharm, VS Code, and IDLE are IDEs for Python, while Microsoft Word is a word processor.PyCharm، VS Code اور IDLE Python کے IDE ہیں، جبکہ Microsoft Word ایک ورڈ پروسیسر (Word Processor) ہے۔ - 13
PyCharm is available in which editions?
PyCharm کن ایڈیشنز (Editions) میں دستیاب ہے؟
- A.A free Community edition and a paid Professional edition (correct answer)ایک مفت کمیونٹی (Community) ایڈیشن اور ایک ادائیگی والا پروفیشنل (Professional) ایڈیشن
- B.Only a paid editionصرف ادائیگی والا ایڈیشن
- C.Only a free editionصرف مفت ایڈیشن
- D.A free edition and a free Professional editionایک مفت ایڈیشن اور ایک مفت پروفیشنل ایڈیشن
Why: PyCharm is a powerful IDE for Python available in a free Community edition and a paid Professional edition.PyCharm Python کے لیے ایک طاقتور IDE ہے جو مفت کمیونٹی ایڈیشن اور ادائیگی والے پروفیشنل ایڈیشن میں دستیاب ہے۔ - 14
Which IDE is included with Python when it is installed?
Python انسٹال ہونے پر کون سا IDE اس کے ساتھ شامل ہوتا ہے؟
- A.PyCharm Professional
- B.VS Code
- C.Eclipse
- D.IDLE (correct answer)
Why: IDLE is the IDE that comes included with the Python installation.IDLE وہ IDE ہے جو Python کی انسٹالیشن (Installation) کے ساتھ شامل آتا ہے۔ - 15
Which of the following steps is NOT part of the basic programming process?
مندرجہ ذیل میں سے کون سا مرحلہ بنیادی پروگرامنگ کے عمل کا حصہ نہیں ہے؟
- A.Executingچلانا (Executing)
- B.Ignoring errors (correct answer)خرابیوں (Errors) کو نظر انداز کرنا
- C.Writing codeکوڈ (Code) لکھنا
- D.Compiling or interpretingکمپائل (Compile) یا انٹرپریٹ (Interpret) کرنا
Why: Write code, compile/interpret, and execute are the basic steps; ignoring errors is not part of the process.کوڈ لکھنا، کمپائل/انٹرپریٹ کرنا اور چلانا بنیادی مراحل ہیں؛ خرابیوں کو نظر انداز کرنا اس عمل کا حصہ نہیں ہے۔ - 16
In PyCharm, where do you connect a project to the Python interpreter?
PyCharm میں پروجیکٹ (Project) کو Python انٹرپریٹر (Interpreter) سے کہاں جوڑا جاتا ہے؟
- A.In the "Project Interpreter" section of the Configure or Settings menu (correct answer)کنفیگر (Configure) یا سیٹنگز (Settings) مینیو کے "Project Interpreter" حصے میں
- B.In the Print Preview windowپرنٹ پریویو (Print Preview) ونڈو میں
- C.In the Download menuڈاؤن لوڈ مینیو میں
- D.In the Language Pack settingsلینگویج پیک (Language Pack) کی سیٹنگز میں
Why: In PyCharm, you go to "Project Interpreter" in the Configure or Settings menu, click the gear icon, and add the interpreter path.PyCharm میں کنفیگر یا سیٹنگز مینیو کے "Project Interpreter" حصے میں جائیں، گیئر (Gear) کے نشان پر کلک کریں اور انٹرپریٹر کا راستہ (Path) شامل کریں۔ - 17
Which simple script is used to test that the IDE is correctly configured?
IDE کی صحیح ترتیب جانچنے کے لیے کون سی سادہ اسکرپٹ (Script) استعمال کی جاتی ہے؟
- A.import(
- B.print("Hello, Python!") (correct answer)
- C.input("Hello")
- D.delete("test")
Why: Writing print("Hello, Python!") and running it checks the configuration; if the output appears, the IDE is set up correctly.print("Hello, Python!") لکھ کر اسے چلانے سے ترتیب کی جانچ ہوتی ہے؛ اگر آؤٹ پٹ (Output) ظاہر ہو تو IDE صحیح طریقے سے ترتیب دیا گیا ہے۔ - 18
Google Colab provides which kind of environment?
Google Colab کس قسم کا ماحول فراہم کرتا ہے؟
- A.A desktop-only editorصرف ڈیسک ٹاپ پر چلنے والا ایڈیٹر (Editor)
- B.A hardware storeہارڈویئر (Hardware) کی دکان
- C.A free cloud-based Jupyter notebook environment (correct answer)ایک مفت کلاؤڈ پر مبنی (Cloud-Based) Jupyter Notebook ماحول
- D.A paid offline compilerایک ادائیگی والا آف لائن کمپائلر (Compiler)
Why: Google Colab is a free cloud-based platform that provides a Jupyter notebook environment for Python.Google Colab ایک مفت کلاؤڈ پر مبنی پلیٹ فارم ہے جو Python کے لیے Jupyter Notebook ماحول فراہم کرتا ہے۔ - 19
Which libraries are pre-installed in Google Colab?
Google Colab میں کون سی لائبریریاں (Libraries) پہلے سے انسٹال ہوتی ہیں؟
- A.No libraries at allکوئی لائبریری نہیں
- B.NumPy, Pandas, and Matplotlib (correct answer)NumPy، Pandas اور Matplotlib
- C.Only NumPyصرف NumPy
- D.Only Matplotlibصرف Matplotlib
Why: Google Colab comes with Python and popular libraries like NumPy, Pandas, and Matplotlib pre-installed.Google Colab کے ساتھ Python اور مشہور لائبریریاں جیسے NumPy، Pandas اور Matplotlib پہلے سے انسٹال آتی ہیں۔ - 20
Why is Google Colab ideal for beginners?
Google Colab ابتدائی افراد (Beginners) کے لیے کیوں مثالی ہے؟
- A.It needs a supercomputerاسے سپر کمپیوٹر (Supercomputer) کی ضرورت ہوتی ہے
- B.It only works offlineیہ صرف آف لائن (Offline) چلتا ہے
- C.No local installation is required (correct answer)اسے مقامی (Local) انسٹالیشن کی ضرورت نہیں ہوتی
- D.It costs a monthly feeاس کا ماہانہ فیس (Fee) ہوتا ہے
Why: Colab needs no local installation, making it ideal for beginners or users working on machines with limited resources.Colab کو اپنے کمپیوٹر پر انسٹال کرنے کی ضرورت نہیں ہوتی، جس کی وجہ سے یہ ابتدائی افراد یا محدود وسائل والی مشینوں پر کام کرنے والے صارفین کے لیے مثالی ہے۔