Challenge: Parameter Practice
Compito
Swipe to start coding
Write a function compare_numbers that takes two numbers as input and returns a string stating whether the first is greater than, less than, or equal to the second.
- Compare the value of
num1tonum2. - If
num1is greater thannum2, return a string in the format "num1 is greater than num2". - If
num1is less thannum2, return a string in the format "num1 is less than num2". - If
num1is equal tonum2, return a string in the format "num1 is equal to num2".
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Fantastico!
Completion tasso migliorato a 5.56
Challenge: Parameter Practice
Scorri per mostrare il menu
Compito
Swipe to start coding
Write a function compare_numbers that takes two numbers as input and returns a string stating whether the first is greater than, less than, or equal to the second.
- Compare the value of
num1tonum2. - If
num1is greater thannum2, return a string in the format "num1 is greater than num2". - If
num1is less thannum2, return a string in the format "num1 is less than num2". - If
num1is equal tonum2, return a string in the format "num1 is equal to num2".
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
single