human
The Lazy Caterer 's Problem | This function receives an integer n and returns the maximum number of pieces that can be made form pancake using n cuts.
Use the formula.
Driver Code"
Solution in Python:
assistant
#Here is code to the Lazy Caterer 's Problem and the other steps required.
 def findPieces ( n ) :
	return ( n * ( n + 1 ) ) // 2 + 1
print ( findPieces ( 1 ) )
print ( findPieces ( 2 ) )
print ( findPieces ( 3 ) )
print ( findPieces ( 50 ) )