Py23
Fri 17 April 2026
# Program 63: Password Check
def main():
password = "admin123"
user = input("Enter password: ")
if user == password:
print("Access granted")
else:
print("Access denied")
main()
Enter password: admin123
Access granted
# Program 64: Count Characters
def main():
text = input("Enter text: ")
count = {}
for ch in text:
count[ch] = count.get(ch, 0) + 1
print("Counts:", count)
main()
Enter text: rubi
Counts: {'r': 1, 'u': 1, 'b': 1, 'i': 1}
# Program 65: Simple Interest
def main():
p = int(input("Principal: "))
r = int(input("Rate: "))
t = int(input("Time: "))
si = (p * r * t) / 100
print("Simple Interest:", si)
main()
Principal: 120
Rate: 10
Time: 20
Simple Interest: 240.0
Score: 0
Category: misc