Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions task_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# task 1
int_var = 23
question = "You are Iron man? "
question2 = "But who are you? "

ask_1 = input(question)
print("No, I am Iron man!!!")

ask_2 = input(question2)
result = f"Nice to meet you, {ask_2}!"
print(result)
10 changes: 10 additions & 0 deletions task_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# task 2
seconds_input = int(input('Please, input time in seconds here: '))
hours = seconds_input // 3600

other_seconds = seconds_input - (hours * 3600)
minutes = other_seconds // 60

seconds = seconds_input - ((hours * 3600) + (minutes * 60))

print(f"{hours}:{minutes}:{seconds}")
7 changes: 7 additions & 0 deletions task_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# task 3
n = int(input("Please input the number N: "))
double_n = int(str(n) + str(n))
triple_n = int(str(n) + str(n) + str(n))

result = n + double_n + triple_n
print(f"Your result: {result}")
11 changes: 11 additions & 0 deletions task_4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# task 4
number = int(input("Please, input number: "))

max_num = 0
while number > 0:
last_num = number % 10
if last_num >= max_num:
max_num = last_num
number = number // 10

print(max_num)
16 changes: 16 additions & 0 deletions task_5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# task 5
profit_input = int(input("Пожалуйста, введите выручку: "))
costs_input = int(input("Пожалуйста, введите издержки: "))

if profit_input > costs_input:
print("Ваша фирма работает в прибыль! Поздравляю!")
profit = profit_input - costs_input
profitability = (profit / profit_input) * 100
print(f"Рентабельность выручки: {profitability}%")
people = int(input("Введите кол-во сторудников в компании: "))
people_profit = profit / people
print(f"Прибыль на одного сотрудника: {people_profit}")
elif profit_input == costs_input:
print("Ваша фирма работает в ноль!")
else:
print("Ваша фирма работает в убыток! Ужас((")
10 changes: 10 additions & 0 deletions task_6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# task 6
a = int(input("Введите кол-во километров первого дня: "))
b = int(input("Введите кол-во желаемого результата: "))

days = 1
while a < b:
a = a + (a * 0.1)
days = days + 1

print(f"На {days}-й день спортсмен достигнет результата - не менее {b} км")