You actually have the correct answer. An excel formula starts with = so your answer would be =4*6
The issue arises because the string you are trying to print is not a string, rather a float value. Item1, item2 and item3 are strong values (if you type some alphabets in it and not just numbers), but itemonecost, itemtwocost, and itemthreecost are explicitly type casted to float. In line 22, 23, and 24 you’re trying to print a float, by adding it with the string. One cannot add numbers to string. Rather you can type cast the itemcost to string while printing.
Add str(itemonecost) instead of itemonecost in print statement. Do this for other float variables too.
However do note that there are multiple ways to correct this issue, and I’ve just pointed one out.
The primary function of a " Domain name server (DNS" is to translate the URL or web address a user enters in a web browser, into the correct corresponding IP address.
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()