orders = 24
distance = 0
# stop 1
orders -= 8
distance += 10
# stop 2
orders -= 16
distance += 15
print(f"Remaining orders: {orders}, Distance: {distance} Km")Remaining orders: 0, Distance: 25 Km
SyntaxError:False
True, cannot use two assignment operators (= and +=) in the same expression. This should be done on two separate lines.
True, cannot print and assignment expression. This should be done on two separate lines.
False
What’s the ouput of the program and the data type of num1, num2, and num3:
24 42 "2342421"
int, int, str
What’s the ouput of the program and the data type of a, b, and s:
3.0
3
"111"
float int str
Imagine you’re running a busy food truck that starts its day with 20 pending orders and 0 km traveled. As you make deliveries along your route, you’ll stop twice to distribute orders and cover additional distance. Your Task:
Write a Python Script: Update the variables sequentially and then print the final total distance travelled and the remaining number of orders.