בחינת מפמ״ר במדעי המחשב לכיתה ז'/ח׳
star
star
star
star
star
Last updated about 1 year ago
11 questions
שאלה מספר 1
1
סוג השאלה: השלמת ערכים מדויקיםהשלם מהו הפלט המתקבל.num1 = 5num2 = num1 + 1num1 = num2print("num1 = ", num1, "num2 = ", num2)
סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
num1 = 5
num2 = num1 + 1
num1 = num2
print("num1 = ", num1, "num2 = ", num2)
1
סוג השאלה: השלמת ערכים מדויקיםהשלם מהו הפלט המתקבל.num = 1234num1 = num // 100num2 = num % 100print("num1=",num1 ," num2=", num2)
סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
num = 1234
num1 = num // 100
num2 = num % 100
print("num1=",num1 ," num2=", num2)
1
סוג השאלה: השלמת ערכים מדויקיםtitle = "Python is fun!"print(title[3])print(title[::2])print(title[-2])print(len(title))נכון או לא נכון? הפלט המתקבל הוא:hPto sfn
n
14
סוג השאלה: השלמת ערכים מדויקים
title = "Python is fun!"
print(title[3])
print(title[::2])
print(title[-2])
print(len(title))
נכון או לא נכון? הפלט המתקבל הוא:
h
Pto sfn
n
14
1
סוג השאלה: השלמת ערכים מדויקיםהשלם מהו הפלט המתקבל.text = "Programming in python"print(text.find('r'))print(text.find('out'))
סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
text = "Programming in python"
print(text.find('r'))
print(text.find('out'))
שאלה מספר 2
1
סוג השאלה: השלמת ערכים מדויקיםלפניכם קטע קוד חלקי והפלט שיתקבל מהרצתו של קטע הקוד השלם. קטע קוד מכיל לולאה.השלימו את ההוראות של הקטע לקבלת הפלט הנתון. היעזרו בדוגמה הבאה:for item in range(3):print(item + 1, end=" ")הפלט המתקבל: 1 2 3נתון קטע קוד חלקי הבאfor item in range (-, -):print(item)הפלט המתקבל 3 4מהו טווח הערכים שיש להכניס במקום ה-"-" כדי שהפלט המתקבל יהיה:
סוג השאלה: השלמת ערכים מדויקים
לפניכם קטע קוד חלקי והפלט שיתקבל מהרצתו של קטע הקוד השלם. קטע קוד מכיל לולאה.
השלימו את ההוראות של הקטע לקבלת הפלט הנתון. היעזרו בדוגמה הבאה:
for item in range(3):
print(item + 1, end=" ")
הפלט המתקבל: 1 2 3
נתון קטע קוד חלקי הבא
for item in range (-, -):
print(item)
הפלט המתקבל 3 4
מהו טווח הערכים שיש להכניס במקום ה-"-" כדי שהפלט המתקבל יהיה:
שאלה מספר 3
1
לפניך 2 טורים של לולאות. יש להתאים בין זוגות של לולאות תואמות (בשתי הלולאות יתקבל פלט זהה) ולציינם בטבלה בהמשך.
לפניך 2 טורים של לולאות. יש להתאים בין זוגות של לולאות תואמות (בשתי הלולאות יתקבל פלט זהה) ולציינם בטבלה בהמשך.
| Draggable item | arrow_right_alt | Corresponding Item |
|---|---|---|
i = 1 while i <= 10: print(i * 3) i = i + 1 | arrow_right_alt | for item in range (-5, 6): print(item + 6) |
i = 8 while i > 0: print(i * 2) i = i - 2 | arrow_right_alt | i=1 while i <= 30: if i % 3 == 0: print(i) i = i + 1 |
for item in range(1, 12): print(item) | arrow_right_alt | for i in range(16, 3, -4): print(i) |
for item in range (-4, 5, 2): print(item + 5) | arrow_right_alt | i = 1 while i < 10: print(i) i= i + 2 |
שאלה מספר 4
1
האם הקוד מבצע את הנדרש?count = 0for item in range (10):grade = int(input("Please enter a grade:"))if grade > 55 and grade < 80:count = count + 1print(count)
האם הקוד מבצע את הנדרש?
count = 0
for item in range (10):
grade = int(input("Please enter a grade:"))
if grade > 55 and grade < 80:
count = count + 1
print(count)
1
האם הקוד מבצע את הנדרש?count = 0index = 0while index < 10:grade = int(input("Please enter a grade:"))if grade > 55 and grade < 80:count = count + 1print(count)
האם הקוד מבצע את הנדרש?
count = 0
index = 0
while index < 10:
grade = int(input("Please enter a grade:"))
if grade > 55 and grade < 80:
count = count + 1
print(count)
1
האם הקוד מבצע את הנדרש?count = 0index = 10while index > 0:grade = int(input("Please enter a grade:"))if grade > 55 and grade < 80:print(count + 1)index = index - 1print(count)
האם הקוד מבצע את הנדרש?
count = 0
index = 10
while index > 0:
grade = int(input("Please enter a grade:"))
if grade > 55 and grade < 80:
print(count + 1)
index = index - 1
print(count)
1
האם הקוד מבצע את הנדרש?count = 0index = 0while index < 10:grade = int(input("Please enter a grade:"))if grade > 55 and grade < 80:count = count + 1print(count)
האם הקוד מבצע את הנדרש?
count = 0
index = 0
while index < 10:
grade = int(input("Please enter a grade:"))
if grade > 55 and grade < 80:
count = count + 1
print(count)
שאלה 5
1
לפניכם משטח, כל משבצת אורכה ורוחבה 20 צעדים. הצב תופס משבצת שלמה.צייר על גבי המשטח מה הציור אותו מצייר הצבimport turtlewn = turtle.Screen()player = turtle.Turtle()player.shape("turtle")player.goto(0,0)player.left(180)player.forward(80)player.left(90)player.forward(160)player.left(90)player.forward(80)player.left(90)player.forward(80)player.left(90)player.forward(80)turtle.mainloop()
לפניכם משטח, כל משבצת אורכה ורוחבה 20 צעדים. הצב תופס משבצת שלמה.
צייר על גבי המשטח מה הציור אותו מצייר הצב
import turtle
wn = turtle.Screen()
player = turtle.Turtle()
player.shape("turtle")
player.goto(0,0)
player.left(180)
player.forward(80)
player.left(90)
player.forward(160)
player.left(90)
player.forward(80)
player.left(90)
player.forward(80)
player.left(90)
player.forward(80)
turtle.mainloop()
