Find the best answers to your questions at Westonci.ca, where experts and enthusiasts provide accurate, reliable information. Our platform offers a seamless experience for finding reliable answers from a network of experienced professionals. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.
Sagot :
Using the knowledge in computational language in python it is possible to write a code that write an if statement that assigns deliverycomplete with 1 if bricksdelivered is equal to bricksexpected.
Writting the code:
%Define the function CheckDelivery()
function deliveryComplete = CheckDelivery( brickDelivered, bricksExpected)
%Start the if-else statements to check if delievery is completed.
%Delievery completed
if ( brickDelivered == bricksExpected)
deliveryComplete = 1;
%Delievery not completed.
else
deliveryComplete = 0;
%End of if-else
end
%Print the result.
fprintf("deliveryComplete: %d\n",deliveryComplete);
%End of the function.
end
%demo.m
%Call the function for the output 0.
CheckDelivery(10,11);
%Call the function for the output 1.
CheckDelivery(10,10);
function deliveryComplete = CheckDelivery(bricksDelivered, bricksExpected)
deliveryComplete = 0;
if bricksDelivered == bricksExpected
deliveryComplete = 1;
end
end
See more about python at brainly.com/question/18502436
#SPJ1
We appreciate your visit. Hopefully, the answers you found were beneficial. Don't hesitate to come back for more information. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Your questions are important to us at Westonci.ca. Visit again for expert answers and reliable information.