YouTip LogoYouTip

Python Exercise Example89

# Python2.x Python Exercise Instance 89 [![Image 3: Python 100 Examples](#) Python 100 Examples](#) **Title:** A certain company uses a public telephone to transmit data, the data is a four-digit integer, and it is encrypted during transmission. The encryption rules are as follows: add 5 to each digit, then replace the digit with the remainder of the sum divided by 10, and finally swap the first and fourth digits, and swap the second and third digits. **Program Analysis:** None. Program source code: ## Instance #!/usr/bin/python# -*- coding: UTF-8 -*-from sys import stdout if __name__ == ' __main__ ': a = int(raw_input('Enter four numbers:n'))aa = []aa.append(a % 10)aa.append(a % 100 / 10)aa.append(a % 1000 / 100)aa.append(a /
← Python Exercise Example90Python Exercise Example88 β†’