You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Θέματα τελικής εξέτασης ΒΙΟΛ-494, Πανεπιστήμιο Κρήτης . 24 Μαΐου 2021
Λίστα με θέματα για τη τελική εξέταση του μαθήματος ΒΙΟΛ-494, "Εισαγωγή στον προγραμματισμό", Τμήμα Βιολογίας, Πανεπιστήμιο Κρήτης. 24 Μαΐου 2021.
Διδάσκοντας: Αλέξανδρος Καντεράκης
Άσκηση 1
Φτιάξτε μία συνάρτηση η οποία θα παίρνει σαν παράμετρο έναν αριθμό. Η συνάρτηση θα υπολογίζει την απόσταση του αριθμού της παραμέτρου από το 0 και το 10. Η συνάρτηση θα επιστρέφει:
0 Αν ο αριθμός της παραμέτρου είναι πιο κοντά στο 0 από ότι στο 10.
10 Αν ο αριθμός της παραμέτρου είναι πιο κοντά στο 10 από ότι στο 0 ή η απόσταση είναι ίδια.
Σημείωση 1: η απόσταση μεταξύ δύο αριθμών a και b είναι abs(a-b).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters