#Lab 4 Question 1 """ • Get the user to enter a mobile number • Create 1st variable to use a built-in String method to store the Boolean status of whether the mobile number starts with 04 • Create 2nd variable to use a built-in String method to store the Boolean status of whether the mobile number contains only digits • Create 3rd variable to use the built-in Python function to store the Boolean status of whether the mobile number contains only 10 characters • Display the Boolean status of each variable on whether the overall mobile number is valid Below is a sample of the output expected from this file:""" mobilenumber = input("Enter your mobile number: ") print(mobilenumber) x = mobilenumber.startswith("04") print("Does it starts with 04? ",x) y = mobilenumber.isdigit() print("Does it contain only digits? ",y) z = len(mobilenumber) == 10 print("Does it contain only 10 characters? ",z) print("Is the mobile number valid? ", x and y and z) #Lab 4 Question 3 """ Write code to do the following: • Get the user to enter a password • Create 1st variable to use a built-in String method to store the Boolean status of whether the password contains only alphanumeric characters • Create 2nd variable to use the built-in Python function to store the Boolean status of whether the password contains at least 6 characters • Display the Boolean status of each variable on whether the overall password is valid """ password = input("Enter your password: ") c = password.isalnum() print("Does it contain only alphanumeric characters? ",c) d = len(password) >= 6 print("Does it contain at least 6 characters? ",d) print("Is the password valid? ", c and d) #Lab 4 Question 4 """ • Get the user to enter the RMIT website • Convert the RMIT website into lowercase • Create 1st variable to use a built-in String method to store the Boolean status of whether the RMIT website starts with www • Create 2nd variable to use the built-in Python keyword to store the Boolean status of whether the RMIT website contains the word rmit • Create 3rd variable to use the built-in Python keyword to store the Boolean status of whether the RMIT website contains three dots • Create 4th variable to use a built-in String method to store the Boolean status of whether the RMIT website ends with edu.au • Display the Boolean status of each variable on whether the overall RMIT website is valid Below is a sample of the output expected from this file: """ website = input("Enter the RMIT website: ") website = website.lower() print(website) a = website.startswith("www") print("Does it start with www? ",a) b = "rmit" in website print("Does it contain the word rmit? ",b) c = website.count(".") == 3 print("Does it contain three dots? ",c) d = website.endswith("edu.au") print("Does it end with edu.au? ",d) print("Is the website valid? ", a and b and c and d)