This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Это процедурную парадигму. Процедурная парадигма позволяет сделать | |
в программе и функции и процедуры. То есть это позволяет лучше написать | |
код. | |
""" | |
def get_number() -> int: | |
console_input = input("Введите число: ") | |
try: | |
number = int(console_input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sort_imperative(arr): | |
for i in range(len(arr), -1, -1): | |
for j in range(i - 1): | |
if arr[j] > arr[j + 1]: | |
arr[j], arr[j + 1] = arr[j + 1], arr[j] | |
return arr | |
def sort_decratative(arr): | |
return sorted(arr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
info: | |
title: Robot service 3.0 | |
description: |- | |
API сервис управления роботом - пылесосом. | |
license: | |
name: Lopache 2.5 | |
version: 1.0.11 | |
servers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
info: | |
title: Robot service 3.0 | |
description: |- | |
API сервис управления роботом - пылесосм. | |
license: | |
name: Lopache 2.5 | |
version: 1.0.11 | |
servers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Заказ ресурсов на облаке | |
version: 0.0.1 | |
servers: | |
- url: http://localhost:8080/api/v1/ | |
description: Dev server | |
paths: | |
/clouds: | |
get: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
class Ticket: | |
def init( | |
self, | |
price: int, | |
valid_on_date: date, | |
start_zone: int, | |
is_luggage: bool, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class People: | |
def init( | |
self, id: int, fio: str, card_number: int, hash_pass: int, login: str | |
) -> None: | |
self.id: int = id | |
self.fio: str = fio | |
self.card_number: int = card_number | |
self.hash_pass: int = hash_pass | |
self.login: str = login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Controller: | |
def init(self, id: int, remark: str) -> None: | |
self.id: int = id | |
self.remark: str = remark | |
def get_id(self) -> int: | |
return self.id | |
def get_remark(self) -> str: | |
return self.remark |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .bus_stop import BusStop | |
class Bus_Way: | |
def init(self, id: int, remark: str, capacity: int, bus_stops: list[BusStop]) -> None: | |
self.id: int = id | |
self.remark: str = remark | |
self.capacity: int = capacity | |
self.bus_stops: list[BusStop] = bus_stops |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BusStop: | |
def init(self, id: int, name: str, altitude: int) -> None: | |
self.id: int = id | |
self.name: str = name | |
self.altitude: int = altitude | |
def get_id(self) -> int: | |
return self.id | |
def get_name(self) -> str: |
NewerOlder