Answer:
userpassword = {"123456",
"password",
"123456789",
"12345678",
"12345",
"111111",
"1234567",
"sunshine",
"qwerty",
"abc123"}
#We define the function that prompts the user for a password
def user_passinput():
password = input("Choose enter a password: ")
return password
#Function that checks the password
def check_password():
count = 0
check_pass = user_passinput()
if check_pass in userpassword:
print("Yay!! you entered the correct password")
elif count <10:
count = count+1
print("Please try again")
user_passinput()
else:
print ("Maximum tries exceeded")
check_password()
Explanation:
Using Python for this code, in the first line of the code, we list the dictionary of 10 most common passwords searched on the web. In line 12, we define the function that will demand the user to enter a password and return the value the user entered. Line 16 defines the function that checks if the password is common and prints to the screen either "Yay!! you entered the correct password", "Please try again" or "Maximum tries exceeded" depending on the condition that is satisfied. The last line of the code calls the check_password() function, which actually initiates the designed program.
<u>C++ program to print the digit without a comma </u>
#include<iostream>
#include<string>
using namespace std;
void commaremoval(string num) /*Defining function commaremoval with parameter num of string type*/
{
string s=num;
for(int i=0; i< s.length();i++)
{
if(s[i]!=',')
/*Checking whether the string doesn't contain ' ,' */
cout<<s[i]; //Printing Output without comma
}
}
//driver function
int main()
{
string num;
cout<<"Enter a digit between 1,000 and 999,999:"<<endl;
/*taking input from user*/
cin>>num;
commaremoval(num);
//calling function
return 0;
}
<u>Output</u>
Enter a digit between 1,000 and 999,999: 22,343
22343
To gather data from its inputs
Answer:
On a spreadsheet application including MS Excel;
He can select the image and hold down the <em>rotation</em> handle above it while sliding the mouse
Explanation:
Manual rotation of a picture or a text box can be performed by selecting the image or text box in MS Word or a spreadsheet application such as MS Excel. With the mouse select the rotation handle of the picture and drag in the direction desired, left or right.
So as to limit the rotation to 15 degrees hold down the shift button while dragging the rotation handle by clicking on it with a mouse and dragging in the desired direction