Fix the git merge conflicts
Solve the merge conflicts in the Python file
Start file
<<<<<<< HEAD def calculate_total(items): """Calculate total price of items with 10% discount""" total = sum(item['price'] for item in items) return total * 0.9 # Apply 10% discount ======= def calculate_total(items): """Calculate total price of items with tax""" total = sum(item['price'] for item in items) return total * 1.15 # Apply 15% tax >>>>>>> feature/add-tax def format_currency(amount): <<<<<<< HEAD """Format amount as USD""" return f"${amount:.2f}" ======= """Format amount as EUR""" return f"€{amount:.2f}" >>>>>>> feature/currency-update def process_order(items): total = calculate_total(items) <<<<<<< HEAD return { 'status': 'success', 'total': format_currency(total), 'items_count': len(items) } ======= shipping = 5.99 if total < 50 else 0 return { 'status': 'processed', 'total': format_currency(total + shipping), 'shipping': shipping } >>>>>>> feature/shipping
End file
def calculate_total(items): """Calculate total price of items with tax""" total = sum(item['price'] for item in items) total = total * 0.9 # Apply 10% discount return total * 1.15 # Apply 15% tax def format_currency(amount): """Format amount as EUR""" return f"€{amount:.2f}" def process_order(items): total = calculate_total(items) shipping = 5.99 if total < 50 else 0 return { 'status': 'processed', 'total': format_currency(total + shipping), 'items_count': len(items), 'shipping': shipping }
View Diff
1d0 < <<<<<<< HEAD 3,7d1 < """Calculate total price of items with 10% discount""" < total = sum(item['price'] for item in items) < return total * 0.9 # Apply 10% discount < ======= < def calculate_total(items): 9a4 > total = total * 0.9 # Apply 10% discount 11d5 < >>>>>>> feature/add-tax 14,17d7 < <<<<<<< HEAD < """Format amount as USD""" < return f"${amount:.2f}" < ======= 20d9 < >>>>>>> feature/currency-update 24,30d12 < <<<<<<< HEAD < return { < 'status': 'success', < 'total': format_currency(total), < 'items_count': len(items) < } < ======= 34a17 > 'items_count': len(items), 37d19 < >>>>>>> feature/shipping
Solutions by @pacuna:
Unlock 1 remaining solutions by signing in and submitting your own entry