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

You got 35 of 36 possible points.
Your score: 97%
Question 1

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

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 2

υπολογίστε: 7 + 5 ** 2 / 2

Score: 1 of 1
Your answerChoiceScoreCorrect answer

16

0

χμμ.. 12 στο τετράγωνο διά 2

0
Selected

19

1
Should have chosen
Question 3

abs(-5+4)

Score: 1 of 1
Your answerChoiceScoreCorrect answer

-1

0
Selected

1

1
Should have chosen
Question 4

18+20/2

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

28

1
Should have chosen

19

0
Question 5

float(int(5.2))

Score: 1 of 1
Your answerChoiceScoreCorrect answer

5

0

5.2

0
Selected

5.0

1
Should have chosen
Question 6

Τι θα εμφανιστεί;
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 7

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

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

(8 > 2 ** 3) and True

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

(8 > 2 ** 3) and True άρα (8 > 8) and True άρα False and True άρα False

Question 9

Τι θα εμφανιστεί ;
a, b, c, e = 4, 5, 6, 7
print e, a

Score: 1 of 1
Your answerChoiceScoreCorrect answer

5 6

0
Selected

7 4

1
Should have chosen

4 7

0
Question 10

Για την 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 11

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

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

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

Σε ποιο τύπο δεδομένων στη γλώσσα προγραμματισμού 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 13

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

Score: 1 of 1
Your answerChoiceScoreCorrect answer
str (συμβολοσειρά)'45.356'1str (συμβολοσειρά)
boolTrue1bool
float12.01float
int12/51int
Question 14

τι θα εμφανιστεί;
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 15

10 + 4**2 * 2**2 < 6 % 16 / 6 * 6

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

10 + 4**2 * 2**2 < 6 % 16 / 6 * 6 ή 10 + 16 * 4 < 6 / 6 *6  ή  10 + 64 < 1 * 6 ή 74 < 6 ή False

Question 16

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

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

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

1
Should have chosen

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

0

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

0
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

(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 19

15 % 20

Score: 1 of 1
Your answerChoiceScoreCorrect answer

0

0
Selected

15

1
Should have chosen

20

0
Question 20

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

a=20

b=19

mo=( ___  +____ )/2

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

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

Score: 1 of 1
Your answerChoiceScoreCorrect answer

mo=( a + b)/2

0
Selected

mo=float(a + b )/2

1
Should have chosen

mo=( a + b )/2

mo=float(mo)

0
Question 21

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 22

(12 > 11) or (3 ** 3 + 4 / 16 + 8 ** 2 * 5 - 4 == 4)

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

(12 > 11) or (3 ** 3 + 4 / 16 + 8 ** 2 * 5 - 4 == 4) άρα True or οτιδήποτε θα είναι True. (Δε χρειάζεται άλλη απόδειξη)

Τυπικά:  True or (27 + 0 + 320 - 4 == 4)  άρα True or (343==4) άρα True or Fasle άρα True

Question 23

str(1)+str(1)

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

'11'

1
Should have chosen

'2'

0
Question 24

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 25

5<=2+3

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

True, είναι η απάντηση αφού θα προηγηθεί η πρόσθεση 5<=5
 

Question 26

3 * 3 + 3 > 3 ** 3 - 3

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

3 * 3 + 3 > 3 ** 3 - 3 άρα 9 + 3 > 27 - 3 άρα 12 > 24 άρα False

Question 27

str(float(int(5.99)))
 

Score: 1 of 1
Your answerChoiceScoreCorrect answer

5

0
Selected

'5.0'

1
Should have chosen

'5.99'

0
Question 28

Ποιος είναι γρηγορότερος,ο άνθρωπος ή ο υπολογιστής στο παρακάτω αριθμητικό πρόβλημα;

5 / 4 ** 1111111111111111111111111

Αν το βρεις σε λιγότερο από ένα λεπτό τότε σίγουρα ο άνθρωπος είναι

Για δοκίμασε και το χρόνο που θα κάνει ο υπολογιστής σου (αν αργήσει δοκίμασε ctr+alt+del και τερμάτισε την python)!

 

 

Score: 0 of 1
Your answerChoiceScoreCorrect answer

Ο υπολογιστής θα το υπολογίσει γρηγορότερα και το αποτέλεσμα είναι 2345234691782643876

 

0

Ο άνθρωπος θα το υπολογίσει γρηγορότερα και το αποτέλεσμα είναι 0

0
Should have chosen
Selected

Ο άνθρωπος θα το υπολογίσει γρηγορότερα και το αποτέλεσμα είναι 1

0

Ο υπολογιστής θα το υπολογίσει γρηγορότερα και το αποτέλεσμα είναι 0

0
Question 29

(5 > 2) and (4 <= 4)

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

(5 > 2) and (4 <= 4) άρα True and True άρα True

Question 30

10 / 2 + 5 == math.sqrt (100)

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

10 / 2 + 5 == math.sqrt (100) άρα 5+5 == 10 άρα 10 == 10 άρα True

Question 31

Ισοδύναμα ή όχι; divmod(5,12) με divmod(12,5)

Score: 2 of 2
Your answerChoiceScoreCorrect answer
(0,5)divmod(5,12) 1(0,5)
(2,2)divmod(12,5)1(2,2)
Question 32

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

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 33

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 34

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

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

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

Question 35

2 % 2 <= 2 - 2

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

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