Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function to check whether a user is validuser 5 pass 5 When a particular user is going to login , program will ask
Write a function to check whether a user is validuser
pass
When a particular user is going to login program
will ask for userid and password and that will be
matched with stored userid and password from
that predefined array.
If the given userid and password is: "userl" and
"pass I" and no of digits that will be used to
generate token is
then the output message should be
"Welcome user and the generated token is:
token where "token is the token
generated based on first digit Palindrome
number concatenated with "token" string literal
value.
A palindromic number also known as a numeral
palindrome or a numeric palindrome is a
number such as that remains the same
when its digits are reversed. In other words, it
has reflectional symmetry across a vertical axis.
Thetarm nalindmmicic derivad fram nalindinma
user or not. If user is valid user then a welcome
message should display with a token number.
Token number will be generated based on first
palindrome number of digits.
If the user is not valid user then the function
should display "UserId or password is not valid,
pls try again.".
All valid Userid and password should be stored
in an array like below :
When a particular user is going to login program
will ask for userid and password and that will be
matched with stored userid and password from
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started