Answer:
string=""
while string not in {"Quit","quit","q"}:
string=input("Enter line to be reversed") #line of text will be entered
if string!="Quit" and string!="quit" and string!="q": #If quit is not entered
print("Reverse of line is : ")
print(string[::-1])
OUTPUT :
Enter line to be reversedThis code is in python language
Reverse of line is :
egaugnal nohtyp ni si edoc sihT
Enter line to be reversedHello world
Reverse of line is :
dlrow olleH
Enter line to be reversedquit
Explanation:In the above program, First a while loop is executed and checked if line of text is not 'quit', 'Quit' or 'q'. If condition is true, then loop is executed and in python any string or list can be traversed from end if step is given -1. Similarly line of text is accessed from the last element. If quit is entered, then the program will be broken out of the loop.
Answer:
Following is the algorithm to interchange the value of two variable x and y.
step 1:Read the two integer x and y.
step 2 :t=x
Step 3: x=y
step 4: y=t
The minimum number of assignment to do this is 3
Explanation:
After reading two integer x & y, create a variable "t" of integer type.
with the help of variable "t", we can swap the value of variable x and y.
It requires 3 assignment to interchange the value.
I think the question is referring to the tab key.
A database is used to organize a large collection of data, hence the name database. It is literally a base that would contain a chunk of data that a person or an organization will need to pull out later when they need it. Databases are usually used by companies or organizations
Suppose that a linked list is used as a data structure for the hash table, create a program that includes steps his application counts the number of phrases in documents decided on via way of means of the user #include.
<h3>What is Programming?</h3>
It is the manner of making hard and fast commands that inform a pc the way to carry out a task. Programming may be finished the usage of lots of pc programming languages, inclusive of JavaScript, Python, and C++.
- This application counts the quantity of phrases in documents decided on via way of means of the user.
- #include
- #include
- #include the usage of namespace std; //Function 1 int count(string word)go back word.size();
- }
- //Function 2
- int vowel(string word)> filename;
- //Open the {input|enter">enter file.
- inputfile.open(filename.c_str()); cout<<"nWord listing after format";
- cout<<"n____nn"; //If the file succesfully opened, process it.if (inputfile).
Read more about program :
brainly.com/question/1538272
#SPJ1