Τελεστές-Μεταβλητές-Βασικές Συναρτήσεις-print

You got 32 of 35 possible points.
Your score: 91%
Question 1

3 - 3 ** 2 / 3 == 3

Score: 1 of 1
Your answerChoiceScoreCorrect answer
True0
Selected
False1
Should have chosen

3 - 3 ** 2 / 3 == 3 άρα 3 - 9 / 3 == 3 άρα 3 - 3 == 3 άρα 0 ==3 άρα False

Question 2

Σε ποιο τύπο δεδομένων στη γλώσσα προγραμματισμού Python αντιστοιχούν οι τιμές της αριστερής στήλης του παρακάτω πίνακα. Να συνδέσετε κατάλληλα τις τιμές της αριστερής στήλης με το σωστό τύπο δεδομένων της δεξιάς στήλη

Score: 1 of 1
Your answerChoiceScoreCorrect answer
float (κινητής υποδιαστολής)float(15%4)1float (κινητής υποδιαστολής)
str (συμβολοσειρά)'15/4.0'1str (συμβολοσειρά)
int (ακέραιος)10/31int (ακέραιος)
Question 3

18+20/2

Score: 1 of 1
Your answerChoiceScoreCorrect answer

19

0
Selected

28

1
Should have chosen
Question 4

για το παρακάτω τμήμα προγράμματος, ποια έντολή θα επιλέγατε ώστε να εμφανίζει το μήνυμα:
Ποιο socket επιλέγεις για ______ πυρήνες; π.χ. αν ο χρήστης δώσει 4, θα εμφανίζει: Ποιο socket επιλέγεις για 4 πυρήνες;
cores=input('Πόσους πυρήνες διαθέτει ο επεξεργαστής; ')
socket=______________________

Score: 0 of 1
Your answerChoiceScoreCorrect answer

socket=input('Ποιο socket επιλέγεις για ' + str(cores) + ' πυρήνες')

0
Should have chosen
Selected

socket=input('Ποιο socket επιλέγεις για ' ,cores, ' πυρήνες')

0

socket=input('Ποιο socket επιλέγεις για ' +cores+ ' πυρήνες')

0
Question 5

4 + 4 / 4 - 4 % 4 == 4

Score: 1 of 1
Your answerChoiceScoreCorrect answer
True0
Selected
False1
Should have chosen

4 + 4 / 4 - 4 % 4 == 4 ή 4 + 1 - 0 == 4 ή 5 == 4 ή False

Question 6

τι θα εμφανιστεί;
x=5
x*=2
print x
x+=10
print x

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

10
20

1
Should have chosen

5
10

0

10
15

0
Question 7

τι θα εμφανιστεί;

print '1'+'1'

Score: 1 of 1
Your answerChoiceScoreCorrect answer

error

0
Selected

11

1
Should have chosen

2

0
Question 8

τι θα εμφανιστεί στην οθόνη;

a=5

b=10

print a,b

a,b=b,a

print a,b

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

5    10

10    5

1
Should have chosen

10   5

5    10

0
Question 9

a, b = divmod (pow(3, 2) , int(3.9))

ποιες οι τιμές για τα a και b;

Score: 1 of 1
Your answerChoiceScoreCorrect answer

a θα είναι 0 και b θα είναι 3

0
Selected

a θα είναι 3 και b θα είναι 0

1
Should have chosen

a θα είναι 2 και b θα είναι 2

0
Question 10

(2 + 2 ** 2 >= 2 * 3) and ( 3 * 2 - 2 / 3 == 6 ** 2 / 6)
 

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

(2 + 2 ** 2 >= 2 * 3) and ( 3 * 2 - 2 / 3 == 6 ** 2 / 6) άρα (2 + 4 >= 6) and ( 6 - 0 == 36 / 6) άρα ( 6 >= 6) and (6 == 6) άρα True and True άρα True

Question 11

(15 > 20 / 2) or (3**123*3132+2987-2354/2354265<=238293-23213*23)

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

(15 > 20 / 2) or (3**123*3132+2987-2354/2354265<=238293-23213*23) άρα (15 > 10) or (οτιδήποτε) άρα True or (οτιδήποτε ) άρα True

True or οτιδήποτε είναι True 

Question 12

Τι θα εμφανιστεί;
x=5
x=x+3
x+=4
print x

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

12

1
Should have chosen

9

0

8

0
Question 13

Για την Python 2.7, αντιστοιχείστε τα στοιχεία της στήλης Α με αυτά της στήλης Β

Score: 1 of 1
Your answerChoiceScoreCorrect answer
'55'str(5)+'5'1'55'
55int(5.0*11)155
50abs(5-55)150
'123'str(1)+str(2)+str(3)1'123'
6int(1.0)+int(2.0)+int(3.0)16
6.0float(6)16.0
8pow(2,3)18
Question 14

Για τις τιμές στις λογικές μεταβλητές ή εκφράσεις, Α=True, B=False, C=True,

να επιλέξετε τη απάντηση True ή False στην παρακάτω λογική πρόταση:

A or B and not C

Score: 0 of 1
Your answerChoiceScoreCorrect answer
True0
Should have chosen
Selected
False0

A or B and not C = True or False and not True =  True or False and False = True or False = True

Question 15

type('Καλή επιτυχία')

Score: 1 of 1
Your answerChoiceScoreCorrect answer

καλή επιτυχία

0
Selected

str

1
Should have chosen
Question 16

6 + 1 - 3 % 4 == 2 ** 2

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

6 + 1 - 3 % 4 == 2 ** 2 άρα 6 + 1 - 3 == 4 άρα 4==4 άρα True

Question 17

(3 / 3) ** 3 < 3 + 3 / 3

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

(3 / 3) ** 3 < 3 + 3 / 3 ή 1 ** 3 < 3 + 1 ή 1 < 4 True

Question 18

5 + 3 ** 2 - 3 >= 10 % 4 + 10

Score: 0 of 1
Your answerChoiceScoreCorrect answer
Selected
True0
False0
Should have chosen

5 + 3 ** 2 - 3 >= 10 % 4 + 10 άρα 5 + 9 - 3 >= 2 + 10 άρα 11 >= 12 άρα False

Question 19

5 + 3 ** 2 == 4 ** 2 / 2 + 2 * 3

Score: 0 of 1
Your answerChoiceScoreCorrect answer
True0
Should have chosen
Selected
False0

5 + 3 ** 2 == 4 ** 2 / 2 + 2 * 3 άρα 5 + 9 == 16 / 2 + 6 άρα 14 == 8 + 6 άρα 14 == 14 άρα True

Question 20

Να καταγράψετε τι πιστεύετε ότι θα εμφανιστεί στην οθόνη μετά την εκτέλεση του παρακάτω τμήματος προγράμματος:

x=25

y=10

x+=2

y-=3

z=x/y

c=x%y

print z, c

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

3 6

1
Should have chosen

6 3

0

4 0
 

0
Question 21

int(5/float(2))

Score: 1 of 1
Your answerChoiceScoreCorrect answer

2.5

0
Selected

2

1
Should have chosen
Question 22

4 / 2 + 5 == 10 - 6 / 2

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

4 / 2 + 5 == 10 - 6 / 2 άρα 2 + 5 == 10 - 3 άρα 7 == 7 άρα True

Question 23

Έστω το παρακάτω τμήμα προγράμματος:

a=20

b=19

mo=( ___  +____ )/2

print '  Ο μέσος όρος των αριθμών είναι: ', mo

Για την Python 2.7, Τι θα επιλέγατε για να υπολογιστεί με ακρίβεια ο μέσος όρος, δλαδή 19.5 και όχι 19;

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

mo=float(a + b )/2

1
Should have chosen

mo=( a + b )/2

mo=float(mo)

0

mo=( a + b)/2

0
Question 24

2/4 ίδιο με 2/4.0 ;

Score: 2 of 1
Your answerChoiceScoreCorrect answer
0.52/4.010.5
02/410
Question 25

2 % 2 <= 2 - 2

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

2 % 2 <= 2 - 2 ή 0 <= 0 ή True

Question 26

15 % 20

Score: 1 of 1
Your answerChoiceScoreCorrect answer

0

0

20

0
Selected

15

1
Should have chosen
Question 27

Τι θα εμφανιστεί;

a=b=c=5

a+=2

print a, b, c

Score: 1 of 1
Your answerChoiceScoreCorrect answer

7 7 7

0
Selected

7 5 5

1
Should have chosen
Question 28

Τύποι δεδομένων

Σε ποιο τύπο δεδομένων στη γλώσσα προγραμματισμού Python 2.7 αντιστοιχούν οι τιμές της αριστερής στήλης του παρακάτω πίνακα.
Να συνδέσετε κατάλληλα τις τιμές της αριστερής στήλης με το σωστό τύπο δεδομένων της δεξιάς στήλης.

Score: 1 of 1
Your answerChoiceScoreCorrect answer
int(ακέραια)15/61int(ακέραια)
float (κινητής υποδιαστολής)18.0/61float (κινητής υποδιαστολής)
str(συμβολοσειρά)'18/6'1str(συμβολοσειρά)
bool (λογική)type(15>3)1bool (λογική)
Question 29

Ποια από τα παρακάτω ονόματα  μεταβλητών είναι αποδεκτά στην  Python;

Score: 1 of 1
Your answerChoiceScoreCorrect answer
NAIVathmos_me_keno1NAI
ΟΧΙVathmos_1@1ΟΧΙ
Question 30

10-6/4 == 1

Score: 1 of 1
Your answerChoiceScoreCorrect answer
True0
Selected
False1
Should have chosen

10-6/4 == 1,  δηλαδή 10-1 ==1 ή 9 == 1 ή False

 

Question 31

Ποια από τα παρακάτω ονόματα  μεταβλητών είναι αποδεκτά στην  Python;

Score: 1 of 1
Your answerChoiceScoreCorrect answer
ΟΧΙprint1ΟΧΙ
ΝΑΙpali_tha_milame_gia_vathmous1ΝΑΙ
Question 32

τι θα εμφανιστεί; print 'Γεια σας' * 5

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

Γεια σαςΓεια σαςΓεια σαςΓεια σαςΓεια σας

1
Should have chosen

Γεια σας5

0

SyntaxError

0
Question 33

Υπολόγισε 2 ** 3 + 3 ** 2 / 3

Score: 1 of 1
Your answerChoiceScoreCorrect answer

9

0
Selected

11

1
Should have chosen

8

0
Question 34

pow(int(8.0/3),3)

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

8

1
Should have chosen

9

0
Question 35

8 ** 2 / 2 + 2 <= 34

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected
True1
Should have chosen
False0

8 ** 2 / 2 + 2 <= 34 άρα 64 / 2 + 2 <=34 άρα 32+2<=34 άρα 34<=34 άρα True