в теле функции обязательно отбивать табом команды. таб == 4 пробела. Блять.
Что-то R мне нравится больше.
#comments
""" commentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscomments
"""
Примитивнейшие задачки:
1) You've finished eating at a restaurant, and received this bill:
# Assign the variable meal the value 44.50 on line 3!meal = 44.50tip = 44.50 * 0.15cost = meal + tip
Что-то R мне нравится больше.
#comments
""" commentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscommentscomments
"""
Now let's work with exponents.
eight = 2 ** 3
In the above example, we create a new variable called
eight and set it to 8, or the result of 2 to the power to 3 (2^3).
Notice that we use
Our final operator is modulo. Modulo returns the remainder from a division. So, if you type
** instead of * or the multiplication operator.Our final operator is modulo. Modulo returns the remainder from a division. So, if you type
3 % 2, it will return 1, because 2 goes into 3 evenly once, with 1 left over.# comment's linemonty = Truepython = 1.234monty_python = python ** 2
Примитивнейшие задачки:
1) You've finished eating at a restaurant, and received this bill:
- Cost of meal: $44.50
- Restaurant tax: 6.75%
- Tip: 15%
You'll apply the tip to the overall cost of the meal (including tax).
Комментариев нет:
Отправить комментарий