To Practice this Program, you should have a basic knowledge of the following Topics:
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.
Following are the steps to do :
</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>
<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>
- 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
