Log in
Sign up for FREE
arrow_back
Library

בחינת מפמ״ר במדעי המחשב לכיתה ז'/ח׳

star
star
star
star
star
Last updated about 1 year ago
11 questions
שאלה מספר 1
1
1
1
1
שאלה מספר 2
1
שאלה מספר 3
1
שאלה מספר 4
1
1
1
1
שאלה 5
1
Question 1
1.

סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
num1 = 5
num2 = num1 + 1
num1 = num2
print("num1 = ", num1, "num2 = ", num2)

Question 2
2.

סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
num = 1234
num1 = num // 100
num2 = num % 100
print("num1=",num1 ," num2=", num2)

Question 3
3.

סוג השאלה: השלמת ערכים מדויקים
title = "Python is fun!"
print(title[3])
print(title[::2])
print(title[-2])
print(len(title))
נכון או לא נכון? הפלט המתקבל הוא:
h
Pto sfn n 14

Question 4
4.

סוג השאלה: השלמת ערכים מדויקים
השלם מהו הפלט המתקבל.
text = "Programming in python"
print(text.find('r'))
print(text.find('out'))

Question 5
5.

סוג השאלה: השלמת ערכים מדויקים
לפניכם קטע קוד חלקי והפלט שיתקבל מהרצתו של קטע הקוד השלם. קטע קוד מכיל לולאה.
השלימו את ההוראות של הקטע לקבלת הפלט הנתון. היעזרו בדוגמה הבאה:
for item in range(3):
print(item + 1, end=" ")
הפלט המתקבל: 1  2  3
נתון קטע קוד חלקי הבא
for item in range (-, -):
print(item)
הפלט המתקבל 3    4
מהו טווח הערכים שיש להכניס במקום ה-"-" כדי שהפלט המתקבל יהיה:

Question 6
6.

לפניך 2 טורים של לולאות. יש להתאים בין זוגות של לולאות תואמות (בשתי הלולאות יתקבל פלט זהה) ולציינם בטבלה בהמשך.

Draggable itemarrow_right_altCorresponding Item
for item in range(1, 12):
print(item)
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 (-4, 5, 2):
print(item + 5)
arrow_right_alt
for i in range(16, 3, -4):
print(i)
i = 1
while i <= 10:
print(i * 3)
i = i + 1
arrow_right_alt
i = 1
while i < 10:
print(i)
i= i + 2
Question 7
7.

האם הקוד מבצע את הנדרש?
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)

Question 8
8.

האם הקוד מבצע את הנדרש?
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)

Question 9
9.

האם הקוד מבצע את הנדרש?
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)

Question 10
10.

האם הקוד מבצע את הנדרש?
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)

Question 11
11.

לפניכם משטח, כל משבצת אורכה ורוחבה 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()