Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
Python 3.7.2
def readFile(file):
with open(file, 'r', encoding = 'utf-8') as file:
text = file.readlines()
return text
file = input('Enter path to file: ')
text = ' '.join(readFile(file))
most_word = ['', 0]
for word in text.split(' '):
if most_word[1] < text.count(word):
most_word[0] = word; most_word[1] = text.count(word)
print(most_word)
program xxx;
var i, s : integer;
begin
s: =0;
for i: = 10 to 99 do
if i mod 5 = 0 then s: =s+i;
writeln('сумма двузначных чисел, кратных 5 =', s);
readln
end.
var
a: [1..100] array of integer;
i,n,p: integer;
readln(n);
for i: =1 to n do
readln(a[i]);
p: =2;
while (p*p< =a[i]) do
if p*p=a[i] then writeln (a[i],' полный квадрат')
p: =p+1;
end;
Популярные вопросы