Μπάμπης Μπουλής
Master of Science in Computer Engineering
Θέμα-Α (Απαντήσεις)
Α1. (5 μονάδες)
- Λάθος
- Λάθος
- Σωστή
- Σωστή
- Λάθος
Α2. (10 μονάδες)
- if taxi==”A” and vath > 9.5: print “πρωτάκι οκ”
- if vath > mo+4: vath=vath-2
- if ap!=”Y” and ap!=”N”: print “ΛΑΘΟΣ ΑΠΑΝΤΗΣΗ”
- x = x + 3*(y-2)
- x=input(“Δώσε x όπου 1≤x≤100”)
while x<1 or x>100:
x=input(“Δώσε σωστό x”)
Α3. (6 μονάδες)
εκχώρηση | τιμή(ές) της x στην μνήμη | τύπος x | |
πχ// | x = 11*2 % 7 | 1 | int |
α) | x = 3+5*3/2.0 | 10.5 | float |
β) | x=len(“aygo”)==len(“koko”) | True | bool |
γ) | x = “45.67” | ‘45.67’ | str |
δ) | x = 2*pow(2,3) | 16 | int |
ε) | x = divmod(7,3) | (2,1) | int |
ζ) | x=str(12.25) | ‘12.65’ | str |
Α4. (4 μονάδες)
τύπος | τιμή |
int
float str bool |
17
23.56 “oktoniatis” True |