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:
The answer to this question is given below in the explanation section.
Explanation:
This question is about to tell the best and suitable terms for the given descriptions in the question.
As we know that a computer program is based on sets of instructions. The CPU carries out the processing using the fetch decode and execute cycle.
It is responsible for implementing a sequence of instructions called a computer program that takes input, processes them, and outputs the result based on processing.
A CPU mainly has three components such as control unit, Arithmetic logic unit, and register.
The control unit controls all parts of the computer system. It manages the four basic operations of the Fetch Execute Cycle such as Fetch, Decode, Executes, and Storage.
So the correct terms of this question are:
Fetch: Gets next instruction
Decode: interprets the instruction
Execute: Carries out instruction.
Store: Save results of instruction.
Answer:
No
It just let us see moving but actually they doesn't move
The voltage on a resistor will be "12 V".
According to the given question,
Current,
Power,
As we know the formula,
→ 
or,
→ 
By putting the giving values, we get
→ 
→ 
Thus the solution above is right.
Learn more about voltage here:
brainly.com/question/18883096
Answer:
a. new, running, waiting, ready, and terminated.
Explanation:
The process in a computer system can have different states and these are:
-New: When the process is created.
-Ready: When the process is waiting to be executed.
-Running: When the process is chosen to be executed.
-Waiting: When the process is expecting for something to happen.
-Terminated: When the process is not running anymore.
According to this, the answer is that the possible states of a process are: new, running, waiting, ready, and terminated.