Answer:
Python Code
Explanation:
total = 0.0
change = 0.0
itemone = float(input("Enter the first price: "))
itemtwo = float(input("Enter the second price: "))
itemthree = float(input("Enter the third price: "))
total = itemone + itemtwo + itemthree
print("Total:", total)
cash = float(input("Cash given: "))
change = total - cash
print("Your change:", change)
for count in range(5, 8):
print(count)
This will produce.
5
6
7
I hope this helps!
Answer:
backup() {
read dirname;
if [[ whereis . /`$dirname` 2> sterr.exe]]
then
mkdir $dirname
for f in . / *.cpp
do
cp f "path_to_dirname"
echo "file backup complete"
}
backup( )
Explanation:
The bash script above is used to backup C++ source files in a directory to a backup directory which is created if it does not exist, and copy's each .cpp file to backup, then sends a message to declare its completion.
Answer: True
Explanation:
Yes, the given statement is true that a DFA is equivalent to NFA in terms of power. For any type of NFA we can easily build an equal DFA so, the NFA are not much powerful as compared to DFA. Both NFA and DFA are characterized by a similar type of class.
DFA is a special case of NFA and They both defined in the same class of language. Each condition in the DFA get summarized by all the condition that the NFA has itself.