Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
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 a, b: real;
begin
writeln('введите количество миль');
readln(a);
b: = a*1.6;
writeln('кол-во киллометров - ',b)
end.
var c,a,b,i,j,l: integer; begin cls;
write('введите через пробел отрезок'); read(a,b); for i: =a to b+1 do begin j: =2; l: =round(sqrt(i)); while (i mod j < > 0) and (j < = l) do begin inc(j); end; if (j > l) then begin write(c,' '); c: =i; end; end; end.
Популярные вопросы