Challenge: Parameter Practice
Tarefa
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".
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Incrível!
Completion taxa melhorada para 5.56
Challenge: Parameter Practice
Deslize para mostrar o menu
Tarefa
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".
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
single