Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider again the same function as in Q 1 , but with a changed precondition: def f ( x ) : ' ' ' Pre:
Consider again the same function as in Q but with a changed precondition:
def fx:
Pre: x is a natural number greater than
a x
y
while a :
a a y
y y
return a y
Assuming the function terminates, what would be a correct variant that?
Question Answer
a
ay is a variant
b
y is a variant
c
ay is a variant
d
None of the above is a variant for this function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started