Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Users of a system are supposed to pick a 3 character pass code such that there is at least one character that is a digit

Users of a system are supposed to pick a 3 character pass code such that there is at least one character that is a digit (number) and one character that is not a letter or number. Something like "A7*" or "45!" or "$2C". The digit and the special symbol may be any of the three characters. Write a program that reads in three characters and prints YES if they meet the criteria and NO if they do not. Hints:

  • Remember cctype has functions for isalpha, isdigit, and ispunct. Check the documentation here.
  • Also remember that ! is NOT. You can express the idea "x is not a digit character" with:
    !isdigit(x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

=+1. Determine the purpose.

Answered: 1 week ago

Question

Do most of the borrowers own homes, have a mortgage, or rent?

Answered: 1 week ago