Answer:
def validateCreditCard(x):
if type(x)==str and len(x) == 8:
print("Valid credit card number")
else:
print("Invalid credit card number")
validateCreditCard("43589795")
Explanation:
Run the code on your text editor(vs code, sublime, pycharm ) you will get your desired response. If your input is not of type string and not up to 8 digit you will get the response "invalid credit card number" but if it is of type string and up to 8 digit you will get "Valid credit card number".
But remember python works with indentation so when you are transferring this code to your text editor it will run properly well.
I defined the code using the conventional pattern "def"
After defining the function you create a brackets (x) to accommodate your argument x and end it with a semi colon.
Then i use "if" statement to make sure only string argument and 8 digit value will be accepted to print a "valid credit card". if your argument does not pass the if statement condition it will print out the else statement condition which is "Invalid credit card number"
Finally, you have to call your function and test various values.
Answer:
Address bar
Explanation:
The address bar is a field in a web browser, usually located at the top, where you type the address of a web page and displays the address of the page you are currently on. The address of a web page is called the Uniform Resource Locator in World Wide Web terminology.
Answer:
// here is program in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variable
int price;
cout<<"enter the price: ";
// read the price
cin>>price;
// find the dollars
int doll=price/100;
// find the cents
int cent=price%100;
// print the dollars and cents
cout<<doll<<" dollars and "<<cent<<" cents.";
return 0;
}
Explanation:
Read the price from user and assign it to variable "price".Then find the dollars by dividing the price with 100 and to find cents calculate modulus 100 of price. Then print both the value.
Output:
enter the price: 4321
43 dollars and 21 cents.
I believe to reboot is to reset. Its the act of resetting, or starting up a computer again.