Skip to content

Instantly share code, notes, and snippets.

@Kerzhakova
Kerzhakova / gist:2dc6ee9b0f5ced07517749655003e1b9
Created October 5, 2025 16:35
кержакова лиза рпо-24.2
// Кержакова рпо-24/2
#include <iostream>
#include <cmath>
using namespace std;
#define task_10
#ifdef task_3
int main(){
double calories_min = 3.6;
@Kerzhakova
Kerzhakova / gist:c82c74784aad1b49b4087f24e8c36c4b
Created September 29, 2025 19:49
Кержакова Лиза c++
// Кержакова рпо-24/2
#include <iostream>
#include <cmath>
using namespace std;
#define task_9
#ifdef task_1
int main(){
int n;
// Кержакова рпо-24/2
#include <iostream>
#include <cmath>
using namespace std;
#define task_18
#ifdef task_1
int main(){
double a, b, S, P;
# def triangle(symb='*', h=5):
# for i in range(1, h + 1):
# print(''* (h-1) + symb * i)
# for i in range(h-1, 0, -1):
# print(''* (h-1) + symb * i)
# triangle()
def indexs(n: int) -> list:
with open('numbers.txt') as file:
content = list(map(int, file.read().split()))
with open('test2.txt', 'w') as file:
# при открытии файла на запись его содержимое удаляется
file.write('hello')
print(1, 4, 5, 6, sep='\n', end='end', file=file)
file = open('test2.txt', 'rt', encoding='UTF-8')
# # print(file)
# # пробежаться по элементам
# words = []
# for i in file:
# words.append(i)
# print(words)
text = file.read()
print(text)
import json
def get_articles() -> dict:
with open('articles.json', 'r', encoding='UTF-8') as file:
data = json.load(file)
return data
def save_article(name, text):
#1
a = list(input())
print(a)
#2
list = [1, 3, 4, 5, 6]
power = sum([number for number in list]); print(power)
#3
list = [1, 2, 333, 77, 22, 9]
list.sort()
print(list[-1])
# numbers = [16, 1, 15, 50, 82]; print(*numbers)
# numbers2 = list(input('Введите кол-во эл-ы списка: ')); print(numbers2)
# # for element in numbers:
# # print(element, end=' ')
# for index in range(len(numbers)):
# print(numbers[index], end=' ')
# numbers.append(7); print(numbers)
# numbers.insert(2, 0); print(numbers)