መቼ እንደሚጠቀሙበት
የ for ወይም የ while ሉፖችን መደበኛ አካሄድ ለመቀየር ይጠቀሙ።
ይጠንቀቁ
break ሙሉውን ሉፕ ወዲያውኑ አቋርጦ ይወጣል፤ continue ግን የአሁኑን ዙር ብቻ ዘልሎ ወደ ቀጣዩ ዙር ያልፋል።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
በ12ኛ ክፍል የየመረጃ ቴክኖሎጂ ገጽ ላይ በዚህ ምዕራፍ ሥር የተመዘገቡት ካርዶች። አንድ በአንድ ይክፈቱ።
መቼ እንደሚጠቀሙበት
የ for ወይም የ while ሉፖችን መደበኛ አካሄድ ለመቀየር ይጠቀሙ።
ይጠንቀቁ
break ሙሉውን ሉፕ ወዲያውኑ አቋርጦ ይወጣል፤ continue ግን የአሁኑን ዙር ብቻ ዘልሎ ወደ ቀጣዩ ዙር ያልፋል።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
መቼ እንደሚጠቀሙበት
ኮድን መስመር በመስመር ለመፈተሽ እና ብሬክፖይንት በመጠቀም የሎጂክ ስህተቶችን ለመለየት ይጠቀሙ።
ይጠንቀቁ
Go ብሬክፖይንት እስኪያገኝ ድረስ ያለማቋረጥ ያስኬዳል፤ Step ግን በእያንዳንዱ መስመር ላይ ያሉ የውስጥ ትዕዛዞችን በዝርዝር ያሳያል።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
መቼ እንደሚጠቀሙበት
የፓይዘን ጽሑፍ ኮድ ወደ ማሽን አፈጻጸም እንዴት እንደሚቀየር ለማስረዳት ይጠቀሙ።
ይጠንቀቁ
የሰርስ ኮድ (.py) መጀመሪያ ወደ ባይትኮድ (.pyc) ይተረጎማል፤ ከዚያም ይህ ባይትኮድ በፓይዘን ቨርቹዋል ማሽን (PVM) አማካኝነት ይፈጸማል እንጂ በቀጥታ በሃርድዌር አይደለም።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
| አጠራር | መጀመሪያ | ማብቂያ (የማይካተት) | እርምጃ | የሚመነጨው ቅደም ተከተል |
|---|---|---|---|---|
| range(x) | 0 | 1 | ||
| range(x, y) | 1 | |||
| range(x, y, z) |
መቼ እንደሚጠቀሙበት
የተለያዩ የመነሻ፡ የማብቂያ እና የእርምጃ እሴቶችን በመጠቀም በ for ሉፕ ውስጥ ቆጠራን ለማከናወን ይጠቀሙ።
ይጠንቀቁ
የላይኛው ወሰን አይካተትም። ለምሳሌ range(5) በ 4 ላይ ያቆማል እንጂ 5ን አያካትትም።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
መቼ እንደሚጠቀሙበት
በፓይዘን ውስጥ if፣ elif፣ else፣ for እና while ብሎኮችን ሲጽፉ ወይም ስህተት ሲያርሙ ይጠቀሙ።
ይጠንቀቁ
በቅድመ ሁኔታ ውስጥ በ == ምትክ ነጠላ = መጠቀም ስህተት ያስከትላል። ከሁኔታው በኋላ ኮሎን (:) መርሳት ወይም በአንድ ብሎክ ውስጥ የተለያዩ የቦታ ክፍተቶችን መጠቀም ስህተት ይፈጥራል።
ከGrade 12 Information Communication Technology፣ ከገጽ 164 ጀምሮ የተዘጋጀ፤ ከመውጣቱ በፊት ሁለት ጊዜ ተረጋግጧል
በዚህ ምዕራፍ ላይ የተጻፉ 10 የምርጫ ጥያቄዎች፣ እያንዳንዳቸው መልሱና ምክንያቱ አላቸው። መልሱን ከመክፈትዎ በፊት ይሞክሩ። ጥያቄዎቹ በእንግሊዝኛ ናቸው።
ጥያቄ 1
Which of the following is NOT one of the three main types of program flow control in Python?
መልስ፦ D Commenting
ምክንያቱ
Python implements program flow control using three constructs: sequential, branching (conditional), and looping (iterative). Comments are descriptive texts ignored by the interpreter and are not a flow control construct.
ጥያቄ 2
In Python, which character is placed at the beginning of a line to write a comment?
መልስ፦ B #
ምክንያቱ
In Python, comments are denoted by the hash symbol (#). Anything written after the # symbol on that line is ignored by the Python interpreter.
ጥያቄ 3
What sequence of numbers is generated by the Python expression range(5)?
መልስ፦ C 0, 1, 2, 3, 4
ምክንያቱ
The range(x) function starts counting from 0 by default and stops at x - 1, excluding the number x itself. Therefore, range(5) generates 0, 1, 2, 3, and 4.
ጥያቄ 4
What is an unexpected problem or fault in a computer program called?
መልስ፦ B A bug
ምክንያቱ
A bug is an unexpected problem in your program that prevents it from running correctly. Debugging is the process of locating and fixing these problems.
ጥያቄ 5
What list of numbers is generated by the function range(1, 10, 2)?
መልስ፦ B 1, 3, 5, 7, 9
ምክንያቱ
In range(x, y, z), x is the start value (1), y is the end limit (10, excluded), and z is the step size (2). This produces 1, 3, 5, 7, and 9.
ጥያቄ 6
What happens when the break statement is executed inside a loop?
መልስ፦ C It stops the loop completely before looping through all items.
ምክንያቱ
The break keyword immediately stops the execution of a loop, causing the program to exit the loop even before reaching the final iteration.
ጥያቄ 7
In the Python IDLE editor, which shortcut key under the Format menu comments out a selected region of code?
መልስ፦ C Alt+3
ምክንያቱ
In Python IDLE, you can use Alt+3 to comment out a selected block of code. To uncomment the region, you use Alt+4.
ጥያቄ 8
During the Python interpreter process, what is the role of the Python Virtual Machine (PVM)?
መልስ፦ C It reads instructions in the bytecode one by one and executes them.
ምክንያቱ
The Python Virtual Machine (PVM) is the runtime component that loads the compiled bytecode (.pyc file), reads each instruction one by one, and executes the specified operations.
ጥያቄ 9
How does the continue keyword differ from the break keyword inside a Python loop?
መልስ፦ A <code>continue</code> stops the current iteration and moves to the next, while <code>break</code> terminates the entire loop.
ምክንያቱ
The continue statement skips the remainder of the current loop iteration and advances directly to the next iteration. In contrast, break exits and terminates the entire loop immediately.
ጥያቄ 10
In the Python IDLE Debug Control window, which button allows you to see all internal commands Python uses to execute the current line before advancing?
መልስ፦ B Step
ምክንያቱ
In IDLE Debug mode, clicking Step lets you see all internal commands Python executes for the current line and advance to the next line. Go runs until a breakpoint is hit, and Over provides line-by-line execution.
መተግበሪያው በዚህ ምዕራፍ ላይ 11 ጥያቄዎች አሉት፤ እየሠሩ ያርምዎታል። እዚህ ያሉት የመጀመሪያዎቹ 10 ናቸው።
ሙሉው የ12ኛ ክፍል የየመረጃ ቴክኖሎጂ መማሪያ መፅሐፍ፣ በነጻ PDF።
የትምህርት ሚኒስቴር እትም, እንግሊዝኛ, 210 ገጾች
Temari ይህን ምዕራፍ ወደ ጊዜ የተቆረጠለት መልመጃ ይለውጠዋል፣ እየሠሩ ያርምዎታል፤ ያልገባዎትንም የሚያብራራ የ AI አስተማሪ አለ።
በነጻ ይጀምሩTemari.et ለ Android ስልኮች መተግበሪያ አለው፤ በ Google Play ላይ በነጻ ይገኛል።