#1 Εισαγωγη Στην Python Και Τα Βασικα Στοιχεια Τησ

download #1 Εισαγωγη Στην Python Και Τα Βασικα Στοιχεια Τησ

of 24

  • date post

    18-Feb-2018
  • Category

    Documents

  • view

    220
  • download

    0

Embed Size (px)

Transcript of #1 Εισαγωγη Στην Python Και Τα Βασικα Στοιχεια Τησ

  • 7/23/2019 #1 Python

    1/24

    PYTHON

    1

  • 7/23/2019 #1 Python

    2/24

    PYTHON

    !

    " #$" %! %&! #' (!)#*& )! %%+*%!)! *% (,-""

    #(#**"*$ P./012 %#34,,! %5,%" "%!#&)! !4+6 %7#*(-!8 &"9

    %6%&)" )! %%+*%!)! *% (,-"" '#" ( "+((#7 ,-! 3"-!

    #(#**4)! "%!#&)!8

    ,( + #+"4:! 3"4 '##"4 +!% (,-""9 "'%& !

    %65,6 "$(#" *% %!,,5 (,-""%8 ;#5'! (&% ( ! %(4"" + 3"$

    %#34,,! P./012 "! +,(" )! %%+*%!)! ! %6%&)" + *% %#34,,!#"$ %#*!%+ ,,#)*5! %#34,,! !4+6 %7#*(-! ?8 "+!5'%

    #+"4:! "% "+! *#7 3"4 "'%& (,-"" *% ,4 #%&(* 3"4

    #%&(* %!,-! # %5,%" + %%+*%!+8 5,9 #5'! "'%& (

    %#34,,! !4+6 *5") +#%"-! +,("$ !57+ (%!5 ,#7#&% ( ! !

    ! !4+6 (,-""8

    @%4 ! ,,#)" %! %%+*%! A %&! "% A5"B

    ! (!)#&:+! %&! (,-"" #(#**"*$ P./012 % %&! 3"5 %9

    ! (!)#&:+! ,%!%* *%!%* (,-""9

    ! (!)#&:+! 3"4 "'%& ( ! %65,6 (,-"" ! !4 9

    ! (!)#&:+! '-#+ !:" ,#7#-! " &+ ! !9

    ! 5'+! ,,#-"% %+'- ! %(4"" + 3"$ %#34,,! P./0129 &

    %#,*34!% ! #" %#*!%+ %#34,,! ?9 ! (!)#&:+! 3"5 ,%+#(&%

    +9

    ! (!)#&:+! ! # ,%+#(& + %#*!%+ ! %&! "% A5" ! (!)#&:+! - ! (#47+!

    ! %%,$! ,4 "%!4# #(#4** "% P./0129

    ! (!)#&:+! 3"4 "'%& (,-"" "+!49

    ! %&! "% A5" ! !$! * %! #(#4**9 ! (#4C+! ! %%,5"+! ,4 "%!4#

    #(#4**9

    ! (!)#&:+! "+ + #5'+! +#%"&% %#*!%+ P./012 ! %&! "% A5" ! (#47+!

    ! %%,$! ,5 %!,5 "% P./012 '#"*-! +$8

    ! "#$

    P./012

    ,-""% #(#**"*$

    2

  • 7/23/2019 #1 Python

    3/24

    "# !#* P./012

    ! P./012

    ##"4 P./012

    ;,%!%* P./012

    %#*!%+ P./012

    (4"" P./012

    ;%#34,,! ?

    5,%" #(#**4)!

    "()(5 ;##"%

    (,-"" #(#**"*$ P./012 %&! * *7,5"%#% (,-""% #(#**"*$ (%!

    '#" ("*&) *% +!* ! '#" #+"4:% +6 4" %,%+& '#!8

    P./012 %,%& ! %,( ( ! %*4A" #(#**"*$ #'4#+ ,() ,4

    + %+!4(!)"+ -4 8 ! 4,, ,%+#49 +!5 ( +,&" "$!A%)!

    #(#**4)! %7#*(-! " &+ %&! ,$ "*!5 ,() )! %%4"%)! )! 33,A-!

    + #5'! ! !8 4 " '-# "* %*5!)! #, %&! ,$

    "*! %,%& 3" %,( ,,5 %#&% + '-#+8

    ! #(#**"* "! P./012 %&! !(& %(4"" + %#34,,! (,-"" "!

    +,(" )! %%+*%!)! -"% ! %&! "% A5" ! %%,5"+! "%!4# #(#4**8

    D"9 "! #- +%! %%+*%! %"4(! 3A*& " (,-"" P./0128 ;#+"4:!

    (%!4 '##"4 "# %65,6 8 "+!5'% #+"4:! +!% (,-""

    A- 3"4 ,%!%* *%!%*4 8 5,9 !75#! "'%& "$(#" *%

    %!,,5 (,-""% ,%!%*4 5!! +-!8 %$%# +%! #5'! (&%

    ( ! %(4"" (,-"" "% 7#%4 ,%+#(4 %#34,,!8 &!% "+! !7#4 "

    ,&" %5,%" #(#**4)! ! #" %#*!%+8 &" #+"4:% %#34,,!

    !4+6 ? #5'! 3"4 '##"4 +8 ! #& +%! #+"4:!

    3"4 "'%& (,-"" "% "+! *#78 #+"&" %#,*34!% + %!")*)*5!+ $+

    %*5!)! *5 %,5('+ #8 #+"&" %&! "+! " %*%!% 5 %!% A

    #+""%& !,+48 5,9 "! 5# +%! #+"4:! (5 " &+ +

    #"75#+! %#34,,! %#*!%+ #5'+! +! !4+6 "%!#&)! %7#*(-! P./012

    '#" + ( 3"5 %!,5 9 5,9 "'%& ( ! ! P./012 ,%+#(& 8

    %& PYTHON

    ,&" + +%! A !7%#A$*% " #4)B

    %&! P./0129

    %&! 3"4 '##"4 +!5 9

    %&! %65,6 #5'+" %!9 %&! ,%!%* *%!%*4 9

    - "+(#&!% *% %!,,5 (,-""% #(#**"*$

    3

  • 7/23/2019 #1 Python

    4/24

    E8E %&! P./012

    ;#! #')#"+*% "! !,+%# #+"&" )! '##"-! (,-""9 !75#+*% "%

    + "*%& P./012 %&! * (,-"" #(#**"*$ +C,$ %5+9 (%! '#" *4,",$ %*5! ("*&)8 +!A) 5! %#-* + &A% "% + "*%& %&! F(& P./012G

    ' 4 4,, (,-"" #(#**"*$8

    %*4A" 9 ) 4A% 4,, (,-"" #(#**"*$9 %& ! %5!+" 4+ '#!+ %

    *5#+ + %!7%#*%!+ -"% ! %&! "% A5" ! ! '#"*%& *% %+'5#% %!%'*5!) ! !

    6"% %((%,*48 I() ,A-# )! %!,,-! (,)""-! + %&! A5"*%9 %$,(

    %#-* + &A% ! ,%+#4 + %!7%#*%!+9 #'4#+ 5*%#+9 #(#**" %&! F(

    ,( ! *4A) P./012G8

    '#! #"4A% ( !%*4A" * (,-"" !75#! ) F*$, *4A"

    %6#-! #%$ #4(!% + 7#$! %&% "! & (,-"" "! (%!%#

    %6%%+*5! (!-" + #%&8 % 4A% %#&)"9 4!)9 %#-* #*5!%9 %4 "*%#

    + +4#'+! %4% %,(59 + &,+! -#*% (,-""%9 ) J JKK9 5) !5% "'%4

    %,(59 ) LM.9 J >M9 "% +#'% "! '-# )! %'%#"-! %7#*(-!9 )

    QR8 (%! !! %&! *& (,-"" %! #4:% ,+ "% ,% %#-"% %! ,$%

    ,% !4(% "! & 3A*8

    ""9 P./012 %&! * ,$ , %,(9 " (& ,$% #%4 %+#%& ,& +,("-!

    #3,*4)! " (& %&! ,$%#% %,(5 ( %*4A" #(#**"*$ #'4#+8

    %#9 %9 %,%& 3" %,( ( ! %$A+!" %7#*(-! "! %#' "*

    %*5!)!9 + %,%& !%&*%! + #(#4**8

    % + "*%& #"#&"+*% %&! P./012 *% %#""%# #&3%8 *5#+ #"#"*&9

    ) (,-"" %5,%" "%!#&)!9 &!+! *%# %! (,-""8 ""9 "*%# (,-"" ,$%

    5! %+#$%# 74"* %&! #%4 ,$"9 -"% 5! ,#5"%# #"#"* %&! %6B

    Python , ! "!

    , # ! $!,

    %&'()*t o+)nt)-, ./n*ton01, 2+o*)-/+01 2+o3+044n356

    "*%& + %&! %&" "*! ! !7%#A%& #%# %6%&)" *% ! "'% #,((#**"*$ ,("*$ %&! !(& ( + %%+*%!+9 -"% ! %&! "% A5" !

    #,+A$! #(#** *% 4!%"8 % #"*5! "*%& )! %!)! #5'! ((,& #9 !

    %,,! " %! %&! #%4 %+#!9 )"" %! !$""! %64 A5* + 7#$! "%

    #(#**"* S %! (5!%8 % 4A% %#&)" ! %%+*%! "-"% +",& !" "%

    A5* (%!%# +79 ) ( #4%(* ,(#A* *5 %*5!)!9 A ! "* '#"

    4)! 3A-! (-! !4,( *% ! %#&)" 4A% 7#48

    E8U "4 '##"4 (,-""

    4

    http://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_1.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#linkhttp://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_1.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#linkhttp://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_1.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#linkhttp://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_1.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#link
  • 7/23/2019 #1 Python

    5/24

    P./012 %&! *7, A- "+!+4:% 5! "$!, '##"-!9 & #"&+! &%#%

    +!%9 %+,& " '#" %*4A" ,,4 +'#! #% "'$ ( *+#(& "$!A%)!

    %7#*(-!8

    3"%# '##"4 P./012%&! ,+AB

    %&! (,-"" +C,$ %5+9

    %&! %#*!%+*%!9

    +"#&:% "9 !%*%!"#%7 ,%+#( #(#**"*9

    %&! ,("* !$ -9

    %&! 7#9

    %&! %6#%4 "'+#9

    5'% ! +! "$!%" !4*6 *% 7#%5 (,-""%9

    %&! , %$, "! %*4A"8

    E8V 65,6 (,-""

    P./012 %&! * "$('#! (,-"" #(#**"*$9 & !$'A% ! WMX1 R2 L1ZZM[ %%& + E\\] !*4"% 5" 4"* )* *4 )! ^12/. P./012Z8 P./012 %&!

    #%4 %!%#( ! *+#(& "+!%'- %6%,&""%8 59 5'% " "# * "%#4

    %"%)! + 4A% !%%# #"A5% 3%,-"%9 !5 '##"4 +!%8

    +#' 5" ( #%4 '#! ! 5" U8_ *% ! ,5! #"7 ! %&! U8`8\8 5" U8`

    5A% " *5" + U]E] %&! %, )! %"%)! U8_9 *% ! 5!! %! A +"#&:! !5%

    ,%+#(&% 3%,-"% ,,4 , +"#68 ;,5!9 U]]a + 5A% 5" V8] %"%

    V8_ A%)#$! ) #! *5,,! (,-""8 U]EU U]Eb 5A! %"% V8V

    V8b9 !&"'9 #5'+" 5" %&! V8b8U8

    @% *%43" "! P./012 V8_ *+#( WMX1 R2 L1ZZM[ 5,3% ! 7" ! *+#("% *

    5" ')#& ! %!75#% ( ! "+*3 *% #($*%!% %"%9 4 & #$!! "% ,%

    %"% U8_8 %!75#! ! 3%,&)" (,-"" "% 47# "*%&9 ) ( #4%(*

    3%,&)" +"#6 c2Xd1e9 #"#*( #"*5!)! "'%&)! (,-"" -"% ! %&!

    %#""%# "+!% *% ! +, (,-"" ! 3%,)A%& '#" #'4#+8

    ""9 + * * "+*3 # &")5'% ) 5,%"* *+#(& #"*5!)!

    #3,*4)! %5,%" "% P./012 V8_ %7#*(-! + 5'+! *+#(A%& *% P./012 U8_8 !

    !*%-" #3,*4)! +$ + $+ *+#(A! %#(,%& "#(5 *%# -"% !

    %&! +! "7, *%7#4 + ,$ - "% P./012 V8

    5

    http://openwin%28%27basikoteraxaraktiristikatispython.html%27%29/http://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_3.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#linkhttp://openwin%28%27basikoteraxaraktiristikatispython.html%27%29/http://rea.elke.uoa.gr/rea/lesson/094027AF-22A2-4E5B-AAFA-A886198BB418/index1_3.html?session_id=C033525C34A805EB5A7EB08132A34521&lessonID=094027AF-22A2-4E5B-AAFA-A886198BB418&login=5DAB6307852241D79B6075C5D0B6E708&registrationID=1127011&logsLessonID=1589930&lgid=4D8C1177FE8C413BAF93D27DF8FB83DD#link
  • 7/23/2019 #1 Python

    6/24

    ! "+(%#*5! A5* 7#4 %+#$%# "$"* P./012 ! # + ,%+#(%&9 '

    ! #'4# '#"9 %!$ "+*5#"* 4!" " %#-* FP./012 U V %&!

    !*7"3 P./012 V9 (& + !#")%$% *5,,! (,-""8

    ""9 ( !4(% + #! #(#4** "+!"$*% ! %34"%% ! %(""%%

    %,%+&% %"% " "%#4 U " "%#4 V8 #5'+"%9 ) A !7%#A%& "! %*%!

    +%!9 %&! U8`8\ V8b8U8 ,( %&!