Python Projects

Job Application with Python (With Validation)

PREREQUISITES

To Practice this Program, you should have a basic knowledge of the following Topics:

PYTHON-FUNCTIONSS

INPUT & PRINT FUNCTION

We will use Input & Print Function to collect & print data from the website user into variables.

dt

STRING METHODS

We will use Lower and Strip methods to  Lower and Remove Extra Spaces if any, from user entry.

python-py

CONDITIONALS - IF ELIF ELSE

We will use If-Elif-Else to break the Loop on correct format.

python-py

WHILE LOOP(INFINITE)

We will use while loop to keep asking the user till the entry in correct format is submitted.

WHAT TO DO ?

Ask the user for the below mention information & validate it with infinite loop for correct format.

_____________________________Application Form__________________________________

Position Applying For(IT Professional/ IT Lead / IT Project Manager) : _____ (Validate For Either of One Position)

Name : _____ (Change it in Title Format)

Email : _____ (Validate for Email Id Format)

Mobile No. : _____ (Validate For Correct Mobile No.)

IT Languages Known(C++ / Java / Python) : _____  (Validate For Either of One Language)

Experience(Fresher/Upto 1 Year/ More than 2Years): ______ (No Validation)

Work Overtime ? (Yes/No) : _______ (Validate For Yes/No)

Shift (Day/Night/ Rotational) : _______ (Validate For Either One)

 

In the end, print a conclusion from user entry in specified format like following :

Output:

_______(name) is looking a job for ___(Position Applying For) in IT. He/She has done _____(Languages known) and has an experience of ___ Years.

HOW TO DO ?

Following are the steps to do :

01.

ASK INFORMATION WITH INFINITE LOOPS

At First, We will ask user information within infinite loop for correct format.

</p>
<div class="wp-block-codemirror-blocks-code-block code-block">
<pre>print("What position do you want to apply for ?")

while True:
  position = input("(IT Professional/ IT Lead / IT Project Manager) ").lower().strip()
  if "it professional" in position or "it lead" in position or "it project manager" in position:
    break
  print()
  print(""Mention Atleast One of the three Positions"") 

name =  input("Name : ").title()

while True:
  email = input("Email Id : ").lower().strip()
  if "@" in email and "." in email:
    break
  print()
  print("Enter the correct Email Id")

while True:
  mobile = input("Mobile No. ").strip()
  if len(mobile) == 10 and mobile.isnumeric():
    break
  print()
  print("Enter the correct 10 Digit Mobile Number")

while True:
  languages = input("Mention Languages you Know (C++/Java/Python) ").lower().strip()
  if "python" in languages or "c++" in languages or "java" in languages:
    break
  print()
  print(""Mention Atleast One of the Languages"")


experience = input("How much experience do you have (in years) ? (0 / 1 / More than 2 ) ")

while True:
  overtime =  input("Are you comfortable in doing Overtime ? (Yes/No) ").lower().strip()
  if overtime == "yes" or overtime == "no":
    break
  print()
  print("Please answer in Yes or No")

while True:
  shift = input("What shift does suit you ? (Day/Night/ Rotational) ").lower().strip()
  if "day" in shift or "night" in shift or "rotational" in shift:
    break
  print()
  print("Mention Atleast One of the Shift")
</pre>
</div>
02.

PRINT/OUTPUT DATA

Finally, We will print the Job Application after accepting user data in correct format.

<div class="wp-block-codemirror-blocks-code-block code-block">
<pre>output = name + " is looking job as " + position + " in IT. He/She has done " +  languages + 
" and holds an experience of " +  experience + " Years. "
print()
print(output)											
														</pre>
</div>
Things We Covered
  • Accepting User Data (Input Function)
  • Lower Format & Removing Spaces (String Methods)
  • Creating IF-ELIF-ELSE (Conditionals)
  • Conditional Event Loop(Infinite Loop with Break)
  • Print/Output the Final Result (Print Function)

Posted by Akshay Gupta

Leave a Reply

Your email address will not be published. Required fields are marked *