Answer:
Check the explanation
Explanation:
# Step 1
the first thing to execute will be......
f = open("states.txt")
# Step 2
the second step is......
states = []
for line in f:
states.append(line.strip())
# Step 3:
the third step is to......
for state in sorted(states):
print(state)
f.close()
Answer:
Here is the bool function isPalindrome:
bool isPalindrome(string s)
{ bool palindrome;
int j;
int len = s.length();
for (int i =0, j= len-1; i < len/2; i++, j--)
if (s[i] == s[j])
palindrome = true;
else
palindrome = false;
return palindrome; }
Explanation:
The bool function isPalindrome takes a string as parameter and returns true if the string is a palindrome or false if the string is not palindrome. The string variable s holds the string value. In function isPalindrome, there is a bool type variable palindrome. bool is a data type which is used to hold values true or false which is then stored in the palindrome variable.
Next it is being found that how many characters are there in the input string using length() function which returns the length of the string. The length of the string is stored in int type variable len.
Next the for loop starts which has two variables i and j where i starts at 0 position of the input string and j starts at the last position of the string. These two variables move or traverse along the string this way. i variable stops when half the length of the input string is reached. At the end of every iteration i moves forward by the increment of its value to 1 and j moves backwards by the decrement of its value to 1.
Every the body of the loop executes, there is an if condition in the body of the loop which checks if the string is a palindrome. This is checked by matching the character at position/index i with the character at position j of the string. This will continue character by character until the i reached half the length of the input string and if every character in i was matched to every character in j then palindrome = true; statement is executed which returns true as the string is a palindrome otherwise palindrome = false; is returned as the string is not a palindrome.
For taking input string from the user and to check if the function isPalindrome() works correctly a main() function is written which takes input string from the user and reads in variable str calls isPalindrome() function. If the string is palindrome then the cout statement in main() function prints the message: String is a palindrome and if the input string is not a palindrome the the following message is displayed in the output screen: String is not a palindrome
int main()
{
string str;
cout<<"Enter a string: ";
cin>>str;
if(isPalindrome(str))
cout<<"String is a palindrome";
else
cout<<"String is not a palindrome";
}
The screenshot of the program along with the output is attached.
Answer:
Correct answer is option B (The reason for using supertypes is to minimize the number of nulls and to minimize the likelihood of redundant relationships)
Explanation:
Entity supertype
A entity supertype is a generic entity type which is related with one or more subtypes.
Use of entity supertype:
The reason for using entity supertype is to reduce redundant relationships and it is also used to minimize the number of nulls.
Answer :
Before answering the question. We look to it in your real life. The minute you wake up and open your eyes, your eyes collect all the information of the room you are in and your brain segregates them depending on the need. So that once you recall that memory it will be already saved in your brain. So your brain is like a computer.
You are collecting data ( information ) of what ever you hear , look and even imagine all day. For extra knowledge, when you put that memory into a form of ( writings , or art if you were an Arabist ) it’s called data visualization.
You are now the data scientist, you collected information form all the surroundings and it’s up to you to display it the way you want but that data must be correct
——
To the real short cut answer
Data , The data is information that is being stored by a computer. This data may be in the sort of text, images, audio clips, software applications, or other varieties of data
Information , information is a term used to describe text that is informative to the individual reading it or the computer processing it.
Or
Information is defined as knowledge gained through study, communication, research, or instruction. Essentially, information is the result of analyzing and interpreting pieces of data. Whereas data is the individual figures, numbers, or graphs, information is the perception of those pieces of knowledge.
Knowledge, In information technology, knowledge is, to an enterprise or an individual, the possession of information or the ability to quickly locate it.
Data science, Data science is the field of applying advanced analytics techniques and scientific principles to extract valuable information from data for business decision-making, strategic planning and other uses.
Your final answer is : Data has the potential to drive better outcomes, processes and of course, new technology that could be the next major industry disruption and breakthrough.”