Prometheus. Масовий онлайн курс "Основи програмування". Лекція 5

  • View
    10.477

  • Download
    1

Embed Size (px)

Transcript

  • : Python, 5, 2015

  • ...

  • ,

  • Python 2.XPython 3.X

  • def function_name(arg1, arg2): ... .. return result

    x = function_name(a, b) ...' , - }

  • () (),

  • ,

  • ,

  • , ,

  • 0! = 1 1! = 1 2! = 12 = 2 3! = 123 = 6 4! = 1234 = 24 5! = 12345 = 120 6! = 123456 = 720 7! = 1234567 = 5040 8! = 12345678 = 40320 9! = 123456789 =36288010! = 12345678910 =3628800

  • ,

    : ,

  • text_prompt()text_input()number_input()positive_input()input_moduleinput_module.pydraw_button()large_button()round_button()drawing_moduledrawing_module.pyfactorial()power()quad_equation()PI = 3.14 FAVORITE_NUM = 7HOLIDAY = 'Sunday'calc_modulecalc_module.py

  • - , ,

  • datetimeMINYEAR, MAXYEARtimedelta, tzinfo, time, date, datetimetimestruct_timeaccept2dyear, altzone, daylight, timezone, tznameasctime(), clock(), ctime(), gmtime(), localtime(), mktime(), sleep(), strftime(), strptime(), time() , randomSystemRandomseed(), getstate(), setstate(), randrange(), randint(), choice(), random(), ... mathpi, efactorial() :-), floor(), exp(), log(), log10(), pow(), sqrt(), acos(), cos(), sin(), tan(), ... ...

  • it's game time!

  • text_prompt()text_input()number_input()positive_input()input_moduleinput_module.pydraw_button()large_button()round_button()drawing_moduledrawing_module.pyfactorial()power()quad_equation()PI = 3.14 FAVORITE_NUM = 7HOLIDAY = 'Sunday'calc_modulecalc_module.py my_packageother_packagemikes_packagesuper_package_with_all_good_things__init__.py__init__.py__init__.py__init__.py , , ,

  • , ,

  • __init__.py

  • ! :

    "", 2015