Write a main function to test valid id

Assignment Help Programming Languages
Reference no: EM132316019

Assignment -

Write a function valid_id that determines if a Students ID is valid. The function takes one argument, a string. For the purpose of this question a valid id is defined as follows:

  • It is exactly 9 characters long.
  • It begins with an uppercase 'N'.
  • All characters except for the first character must be a digit.

Based on these rules your function will determine if the id is valid and print 'Id is valid' or 'Id is not valid' accordingly.

Here's some examples that use your function:

  • valid_id("N123") will print 'Id is not valid'
  • valid_id("NXYZ!5678") will print 'Id is not valid'
  • valid_id("N12345678") will print 'Id is valid'

Write a main function to test valid_id.

Reference no: EM132316019

Questions Cloud

Evaluate key elements of the strategic planning process : Evaluate key elements of the strategic planning process. Develop an EFE matrix that includes factors, weights, ratings, and total weighted scores.
Evaluate key elements of the strategic planning process : A BCG matrix, also known as a growth-share matrix, identifies departments and divisions within an organization that should receive fewer resources than others.
Write a Java program that will display the given output : Using iteration, write a Java program that will display the following output? 1 3 10 30 100 300 1000 3000 10000 30000
Analyze issues leaders face when interpreting the results : A positioning map helps measure an organization against the competition on two dimensions that are important in the marketplace. Examples could be capacity.
Write a main function to test valid id : Write a function valid_id that determines if a Students ID is valid. The function takes one argument, a string. Write a main function to test valid_id
Describe a possible internal control plan for purchases : Reflecting on the product or service of your current or past employer, discuss how would you mitigate risk for purchases, payroll, and fixed assets?
Analyze the selected not-for-profit financial statements : Analyze the selected not-for-profit's financial statements to determine if the statements conform to Financial Accounting Standards Board (FASB) guidance.
Discuss responsibility for detection and prevention of fraud : Find a court case where fraud occurred over several years (using the KU library/Westlaw), and discuss the responsibility for detection and prevention.
Which form will communication be delivered to stakeholders : 401K- How customer final approval will be received. In which form will communication be delivered to stakeholders?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd