Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
hello
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
def convert_seconds(seconds): hours = seconds // 3600 minutes = (seconds - hours * 3600) // 60 remaining_seconds = seconds - hours * 3600 - minutes * 60 return hours, minutes, remaining_seconds print(convert_seconds(5000)[0]) ## output 1: test the fork def hint_username(username): if len(username) < 3: print("Invalid") else: print("Valid") hint_username("melvin") ## output 2 def is_even(number): if number % 2 == 0: return True return False print(is_even(3)) ## output 3 def hint_username(username): if len(username) < 3: print("Invalid") elif len(username) > 15: print("Too long for the username, Invalid") else: print("Valid") hint_username("melvinabcdfgabcbceicbhweicbhwib") ## output 4
[
+
]
Show input
Absolute running time: 0.15 sec, cpu time: 0.02 sec, memory peak: 8 Mb, absolute service time: 0,22 sec
edit mode
|
history
|
discussion
1 Valid False Too long for the username, Invalid