Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following function and bindings in F#, what are the value of finalState and petrol? let drive (petrol, distance) = if distance = far

image text in transcribed

Given the following function and bindings in F#, what are the value of finalState and petrol? let drive (petrol, distance) = if distance = "far" then petrol / 2.0 elif distance = "medium" then petrol - 10.0 else petrol - 1.0 let petrol = 100.0 let firstState = drive(petrol, "far") let secondState = drive(firstState, "medium") let finalState - drive( secondState, "short") 50.0 and 100.0 100.0 and 100.0 40.0 and 100.0 100 and 39 39.0 and 100.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions