Skip to content

Lesson4 - #4

Open
AlKul wants to merge 2 commits into
mainfrom
lesson4
Open

AlKul wants to merge 2 commits into
mainfrom
lesson4

Conversation

@AlKul

@AlKul AlKul commented Oct 27, 2020

Copy link
Copy Markdown
Owner

Here they are!

Comment thread Homework/Lesson4/task1.py
script_name, hours, price, bonus = argv

def salary():
salary = (float(hours)*float(price)) + float(bonus)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

плохо что используете глобальную переменную, лучше было бы использовать более чисто.
Нет обработки переданных типов на предмет ошибок ввода

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Согласен, в следующий раз постараюсь почище, спасибо!

Comment thread Homework/Lesson4/task4.py

def generate_random_array(length, min, max):
from random import randint
global array

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем?????

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подумал, запрашивать с клавиатуры уже умеем, почему бы потренироваться с генерацией случайных. Согласен, было лишнее

Comment thread Homework/Lesson4/task4.py
'''

def generate_random_array(length, min, max):
from random import randint

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отход от PEP8 я говорил импорты в начале файла

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants