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. Цитати великих драматургів. | |
print("To be\n\n\tor not\n\n\t\tto be...\n\n\t\t\t\\ William Shakespeare \\") | |
# Завдання 2. Програма показує на екрані календар поточного місяця. | |
#Правда, у Python ніби є досконаліші методи. | |
print('\n\n ГРУДЕНЬ 2024') | |
print("ПН ВТ СР ЧТ ПТ СБ НД") |
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('\tЗАВДАННЯ IV.1\n') | |
# Розрахувати загальну масу всіх планет Сонячної системи. Обчислити | |
# середнє арифметичне мас планет. Потім — масу кожної планети в | |
# процентному співвідношенні, якщо взяти за 100% загальну масу всіх | |
# планет. У скільки разів маса найбільшої планети більша, ніж сума мас | |
# усіх інших планет? Усі результати — показати на екрані. |
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
# Задачі на if-else, if-elif-else | |
# ПОЧАТОК КОДУ ЗАДАЧІ | |
print("\tЗАВДАННЯ II.1\n") | |
# Ввести три числа і знайти найменше серед них. | |
try: | |
number_one = float(input("Введіть перше число: ")) | |
number_two = float(input("Введіть друге число: ")) | |
number_three = float(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
import os | |
import random | |
os.system("cls") | |
# Завдання на один простий цикл while/for (мінімум 5 будь-яких задач): | |
# ПОЧАТОК КОДУ ЗАДАЧІ | |
print("\tЗАВДАННЯ I.3\n") | |
# Загадати випадковим чином 100 цілих чисел у діапазоні від -100 до 100. |
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 string | |
import re | |
import secrets | |
# Завдання на strings (бажано всі 9 задач, але вистачить 5): | |
# ПОЧАТОК КОДУ ЗАДАЧІ | |
print("\tЗАВДАННЯ 1\n") | |
# Підрахувати середню довжину слова у введеному реченні. |
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 random | |
import time | |
# ПОЧАТОК КОДУ ЗАДАЧІ | |
print("\tЗАВДАННЯ 2\n") | |
# Створити список із 20 випадкових чисел. Вивести всі елементи масиву | |
# з парними індексами. | |
# Список із 20 випадкових чисел з плаваючою комою в інтервалі [0.0; 1.0) | |
random_numbers = [random.random() for _ in range(20)] |
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 os | |
os.system("cls") | |
# ПОЧАТОК КОДУ ЗАДАЧІ | |
print("\tЗАВДАННЯ 2\n") | |
# Написати функцію draw_rectangle, яка виводить на екран прямокутник. | |
# Функція приймає такі параметри: ширина, висота, символ рамки, | |
# символ заповнення. У функції мають бути параметри за замовчуванням. |
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 pandas | |
import json | |
import math | |
def load_and_display_csv(filepath): | |
""" | |
Пробує завантажити файл 28,5 ГБ зі значеннями, розділеними комами (csv), | |
за вказаним шляхом filepath. Виводить індекси та назви колонок. | |
Перехоплює перші можливі помилки. Допоміжна функція для визначення |
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
# ФІНАЛЬНИЙ ПРОЄКТ з дисципліни PYTHON Core | |
# Телеграм-бот "РАДІАЦІЯ В СВІТІ" within the framework AsyncIOTelegram | |
# Виконав студент гр. СПР411 | |
# Комп'ютерної Академії IT STEP | |
# Качуровський Р.Р. | |
# Одеса 2025 | |
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 <iostream> | |
#include <Windows.h> | |
using namespace std; | |
int main() | |
{ | |
// SetConsoleOutputCP(65001); // UTF-8 | |
// setlocale(0, ""); | |
// Встановлюємо кодування консолі для виведення |
OlderNewer