Язык программирования Python

Слайд 2

Считывание из строки k, n = map(int, input().split()) a, b,c = input().split() a,b,c=int(a),int(b),int(c)

Считывание из строки

k, n = map(int, input().split())
a, b,c = input().split()
a,b,c=int(a),int(b),int(c)

Слайд 3

Перевод из 10 в 2, 8 и 16 a=int(input()) b=bin(a) b=str(b)

Перевод из 10 в 2, 8 и 16

a=int(input())
b=bin(a)
b=str(b)
print(b[2:len(b)])
Bin – 2 oct –

8 hex - 16
Слайд 4

a=input() – a – строка! print(int(a,3))

a=input() – a – строка!
print(int(a,3))

Слайд 5

Питон, работа с файлами

Питон, работа с файлами