Practice Coding Problems
Improve your skills by solving real coding problems.
Write code, submit, and get instant feedback.
101 practice problems per language · 12 languages
Double or Nothing
Double a number if it is positive, otherwise print zero.
9 days left
n = int(input()) # Double if positive, otherwise print 0
Select a Language
Python
General-purpose, beginner-friendly language.
Java
Object-oriented, widely used in enterprise.
C
Low-level systems programming language.
C++
Powerful language for performance-critical apps.
C#
Modern language for .NET and game development.
PHP
Server-side scripting for web development.
Kotlin
Modern language for Android and JVM.
JavaScript
The language of the web. Runs in Node.js.
TypeScript
Typed JavaScript for larger applications.
Swift
Apple's language for iOS and macOS apps.
Rust
Safe, fast systems programming language.
R
Statistical computing and data analysis.
How It Works
Each challenge gives you a problem description and starter code in an online editor.
Your program reads input and prints the correct output. When you submit, your code is tested against multiple hidden test cases with different inputs.
Your score is the percentage of tests passed. Pass all tests to earn full XP. Partial credit is given for partially correct solutions.