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
N = int(input("введите число для которого хотите найти факториал: ")) | |
def factorial(N): | |
number = 1 | |
for i in range (1, N+1): | |
number *= i | |
return number |
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
n = int(input("Введите N: ")) | |
sum = 0 | |
i = 1 | |
while i <= n: | |
sum += i | |
i += 1 | |
print("Сумма:", sum) |
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
for i in range (1,11): | |
for j in range (1,11): | |
multiplication = i * j | |
print (f"{i} * {j} = {multiplication}") | |
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
import random | |
minNumber = 1 | |
maxNumber = 10 | |
number = random.randint(minNumber,maxNumber+1) | |
while True: | |
guess = int(input("введите предпологаемое число: ")) | |
if guess == number: |
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
num = int(input("Введите число: ")) | |
if num % 2 == 0: | |
print("Чётное") | |
else: | |
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
programWorking = True | |
print("1 - сумма") | |
print("2 - произведение") | |
print("3 - закрыть программу") | |
while (programWorking): | |
action = int(input("выберите действие: ")) | |
if action == 1: | |
firstNumber = 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
using System; | |
namespace implementationAndObjectives5 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
LinkedList list = new LinkedList(); |
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
using System; | |
using System.Collections.Generic; | |
namespace implementationAndObjectives3 | |
{ | |
internal class Program | |
{ | |
private const int TargetValue = 9; | |
static void Main(string[] args) |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace implementationAndObjectives2 | |
{ | |
internal class Program | |
{ | |
private const int ElementsCount = 100000; | |
private const int MiddleIndex = ElementsCount / 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
using System; | |
namespace implementationAndObjectives1 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
LinkedList list = new LinkedList(); |
NewerOlder