Created
December 17, 2016 18:49
-
-
Save kendhia/8934e1cda653f52c3e6a4f7a0fdcce40 to your computer and use it in GitHub Desktop.
This file contains 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 = int(input("Bir doğal sayi (bitirmek için negatif sayi) giriniz:")) | |
old_nums = [] | |
rep_of_nums = [0]* 10 | |
while (num_int >= 0): | |
if not (num_int in old_nums): | |
old_nums.append(num_int) | |
rep_of_nums[int(num_int%100/10)] += 1 | |
num_int = int(input("Bir doğal sayi (bitirmek için negatif sayi) giriniz:")) | |
print("") | |
output_str = "Son 2 basamağı " | |
output_str2 = "Sayı adedi" | |
output_str3 = "--------------- ----------" | |
print(output_str + " " + output_str2) | |
print(output_str3) | |
print("0-9: %15d" % rep_of_nums[0]) | |
print("10-19: %13d" % rep_of_nums[1]) | |
print("20-29: %13d" % rep_of_nums[2]) | |
print("30-39: %13d" % rep_of_nums[3]) | |
print("40-49: %13d" % rep_of_nums[4]) | |
print("50-59: %13d" % rep_of_nums[5]) | |
print("60-69: %13d" % rep_of_nums[6]) | |
print("70-79: %13d" % rep_of_nums[7]) | |
print("80-89: %13d" % rep_of_nums[8]) | |
print("90-99: %13d" % rep_of_nums[9]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment