Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program should ask the user for their name and email address and then create a random company ID for them which should be an

The program should ask the user for their name and email address and then create a random company ID for them which should be an integer with four digits.
You will write four functions (other than main) in your program.
get_account: a function which calls the following three functions, storing the values they return in three variables.
get_name: asks for and returns the users name
get_email: asks for and returns the users email
calculate_id: calculates and returns a new company ID for the user
After get_account has called these three functions and saved their return values, it should return all three.
In your main function, call get_account and save the three values it returns in variables. These variables should then be printed to the console. A sample run of the program looks like this:
Enter your name: John Smith
Enter your Email: johnsmith@college.com
Name: John Smith
Email: johnsmith@college.com
Company ID: 8547

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago