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
# import requests | |
# response = requests.post('https://paraplancrm.ru/crm/#/') | |
# info = str(response.cookies).split() | |
# # registrationToken = info[1] | |
# user = {'username': ', 'password': , 'rememberMe': True, 'captcha': 'required', | |
# 'loginType': 'enum[KIDS_APP]'} | |
# print(user) | |
# r = requests.post('https://paraplancrm.ru/api/public/login', params=user) | |
# print(r) |
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
# Poker | |
from random import randint | |
bank = int() | |
list_of_players = int() | |
class Poker: | |
global bank |
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
#!/usr/bin/env pybricks-micropython | |
from pybricks.hubs import EV3Brick | |
from pybricks.ev3devices import Motor, ColorSensor, UltrasonicSensor, TouchSensor, GyroSensor | |
from pybricks.parameters import Port, Direction, Button, Stop | |
from pybricks.parameters import Color as Col | |
from pybricks.tools import wait, StopWatch | |
from pybricks.robotics import DriveBase | |
import math |
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
#include <AccelStepper.h> // Все функии библиотеки: https://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html | |
#include <Servo.h> | |
#define pinEnable 8 //Пин включения drv8825 (общий на все приводы) | |
#define pinStep1 3 //Пин шага левого двигателя (Двигатель 1 на схеме) | |
#define pinDirection1 6 //Пин направления левого двигателя | |
#define pinEndStop1 9 //Левый концевой выключатель "Ноль" | |
#define pinStep2 2 //Пин шага правого двигателя (Двигатель 2 на схеме) |
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
print(func_definer_step(-400, 400, "((x/10)**2)*10+140", 500)) | |
# парабола | |
print(func_definer_step(-400, 400, "(1/(x/10))*10+180", 300)) | |
# гипербола | |
print(func_definer_step(0, 400, "(1/(x/10))*10+180", 150)) | |
# гипербола с левой стороны робота | |
print(segment(60, 140, -60, 210, 200)) |
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
import math | |
pi=3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 | |
n_steps = 800 # количество шагов | |
side_len=252 # расстояния между моторами | |
S=220 # длина рычагов | |
r=55 # радиус колёс |
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
#include <AccelStepper.h> // Все функии библиотеки: https://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html | |
#include <Servo.h> | |
#define pinEnable 8 //Пин включения drv8825 (общий на все приводы) | |
#define pinStep1 3 //Пин шага левого двигателя (Двигатель 1 на схеме) | |
#define pinDirection1 6 //Пин направления левого двигателя | |
#define pinEndStop1 9 //Левый концевой выключатель "Ноль" | |
#define pinStep2 2 //Пин шага правого двигателя (Двигатель 2 на схеме) |
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
Уровень 2.2 | |
# № 1 | |
count = 0 | |
my_list = [1, -2, 3, -4, 4, -6, 2, -10, 11] | |
for i in my_list: | |
if i < 0: | |
count += 1 | |
print(count) | |
# № 2 |
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
№1 | |
Дан список со строками. Оставьте в этом списке только те строки, которые начинаются на http://. | |
Код : | |
my_list = ["http://1234", "1234", "str", "http://man"] | |
new_list = [] | |
for i in my_list: | |
my_list.pop(1) | |
print(my_list) | |
№2 |
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
Задание №1 | |
N = int(input("Введите кол-во друзей:\n")) | |
people = {} | |
for i in range(N): | |
name = input("Введите имя: ") | |
i = name | |
age = int(input("Введите возраст: ")) | |
people[i] = age | |
print(people) | |
print(f"Младший из людей : {min(people)}") |
NewerOlder