IFor a banking system, Enter the account number of length 10 and User name in a banking software as a string in input. Check whether the name = “Official”. If name is “Official” then print reverse of the account number. The user next enters a pin number as input string with a combination of Uppercase, lowercase, digits and special character as input . Find the total number of digits and special characters in the pin number and display the count value by appending it to username and print it. Also in the pin number replace ‘_’ special character with character ‘Y’. If the user is not an Official concatenate the “user name” with string “wrong login” and print as output.
Question
IFor a banking system, Enter the account number of length 10 and User name in a banking software as a string in input. Check whether the name = “Official”. If name is “Official” then print reverse of the account number. The user next enters a pin number as input string with a combination of Uppercase, lowercase, digits and special character as input . Find the total number of digits and special characters in the pin number and display the count value by appending it to username and print it. Also in the pin number replace ‘_’ special character with character ‘Y’. If the user is not an Official concatenate the “user name” with string “wrong login” and print as output.
Solution
The text you provided seems to be a problem statement for a programming task. Here's a step-by-step solution in Python:
# Step 1: Get the account number and username as input
account_number = input("Enter your account number: ")
username = input("Enter your username: ")
# Step 2: Check if the username is "Official"
if username == "Official":
# Step 3: If the username is "Official", print the reverse of the account number
print(account_number[::-1])
# Step 4: Get the pin number as input
pin = input("Enter your pin: ")
# Step 5: Find the total number of digits and special characters in the pin
count = sum(c.isdigit() or not c.isalnum() for c in pin)
# Step 6: Display the count value by appending it to the username
print(username + str(count))
# Step 7: In the pin number, replace '_' special character with 'Y'
pin = pin.replace('_', 'Y')
print(pin)
else:
# Step 8: If the user is not an Official, concatenate the username with "wrong login" and print it
print(username + " wrong login")
This Python script will perform the tasks as described in your problem statement.
Similar Questions
Create a class for bank customer : Account number, phone number , name, Gender ( M/F). Create user name and password for online banking using following constraints.User name will be three upper case letters of bank name followed by last three digit of account number then last two character of name( upper case).For bank name : if account number starts with ‘2’ then Indian bank, if it starts with ‘3’ then state bankPass word id middle four digit of phone number preceded by three characters “INB” for “Indian bank and “ STB” for state bank , succeeded by “MA” for male or “ “FE” for female.Account number should be of five digit only ,else print “ Invalid Account Number”.Create three objects and display user name , password and how many accounts in each bank.Example :Input252349034493459MadhavMOutputUser name : IND234AVPass word : INB4493MAINDIAN BANK:1STATE BANK:0
You are required to implement a simple C++ program for managing a bank account. The program should include a class BankAccount with private attributes for account number, account holder name, and account balance.The BankAccount class should have the following:A parameterized constructor to initialize the account number, account holder name, and account balance.A friend function displayAccountInfo that takes a BankAccount object as an argument and displays the account information (account number, account holder name, and account balance).Additionally, the program should check if the account balance is greater than Rs.10,000 and display whether the account holder is eligible for a credit card.Testcase1:Sample Input:12345 // account numberJohn Doe // name15000 // balanceSample Output:12345John Doe15000Yes Testcase2:Sample Input:98765 // account numberVirat Kohli // name8000 // balanceSample Output:98765Virat Kohli8000No
Write code that allow the user to input a number. Use for loop to print the number and 4 numbers after this number the user. For example, if the input is 5, then the program should print:56789
Write a java program to create a bank account with Name of the account holder, type of account(savings or current), Account number and Balance amount in the account. Also, create 5 customers for the class Bank_account using array of objects. Access the customers to perform credit, debit and display of balance.Input 1:Enter the customers:ReenaSavings1231000RobinCurrent4562000PraveenSavings7893000SherinCurrent2342500DeenaSavings5672000Enter choice:1. Credit2. Debit Output :ReenaSavings1232000
Enter the student details using constructors with arguments and constructors without arguments. Then find the total marks of each student. If it is greater than 500 print pass , else print fail.Input:1Neha123456A100100100100100100outputNeha123456A100100100100100100Pass
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.