• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu
+ 2

What is the error ?

I did this code that define a function that return the kcal value to kj but there is no output why ? https://code.sololearn.com/cu3RDKt6MCrx/?ref=app https://code.sololearn.com/cu3RDKt6MCrx/?ref=app https://code.sololearn.com/cu3RDKt6MCrx/?ref=app

pythonoutputfunctionsfunction-argumentsreturnerrorcodeplaygroundvaluenono_output
11th Aug 2019, 3:24 PM
Nada El Annasi
Nada El Annasi - avatar
1 Odpowiedź
+ 2
Well assert gives the AssertionError if the condition is NOT met. Therefore, what you should be doing is: assert (x>=0), "Negative!"
11th Aug 2019, 3:33 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
ok i am devolp website which programing language iam should learn
1 Votes
ai
0 Votes
how do I delete the card so that my subscription is no longer charged?
0 Votes
What code is used to write a mobile application? С помощью какого (каких) кода написано мобильное приложение?
0 Votes
How to add image in css while sololearn coding
0 Votes
What courses should I take to be a data scientist
0 Votes