HackInScience is a code challenge site that is mostly oriented towards learning than competing with others for a top ranking despite the presence of a Leaderboard. It's a playground of fun Python exercises, each with a user-friendly correction bot.
In order to showcase this, let's look at a simple exercise,"Characters counting" which requires writing code to "Print the number of characters in the given paragraph".
The screen is split into the vertical sections. The left side contains the description of what we ought to do in order to solve the challenge, as well as helpful advice, that is pointers to the things you should employ:
Advice
You'll need the len function, which can measure almost anything: lists, strings, ...
If you feel lost, you should start by reading the string tutorial.
and a little tutorial on "How do functions work"
How do functions work
A function is a named thing, that take a value (or multiple ones), do something with it, and often give back another value.
A basic example would be the max function that take multiple values and give back the biggest one, the syntax is:
max(1, 5, 2)
and it would give back 5.
As such it prepares you to go and type the code in the center section of the screen,the Text editor, which is a in browser playground which compiles your code and gives you immediate feedback
print len(whetting_your_appetite)
File "./snippet.py", line 7
print len(whetting_your_appetite)
^
SyntaxError: invalid syntax
However the help when something goes wrong does not just confine itself in mere syntax errors, but through the use of friendly you get more context sensitive advice.For example in the for novices exercise Print 42, this is the message you get if you forget the parentheses:
However, the amount of the help and advice that is being offered varies from exercise to exercise. That said,the exercises are grouped into 5 logically divided sections of increasing difficulty:
1.Python — Basics
2.Python — Training
3.Python — Algorithms
4.Python — Command line
5.Python and Numpy
For instance you'll find exercises like:
- Print 42
- Counting Words
- Print sorbet flavors
- Temperatures
- Print every two letters pairs
- Doing HTTP requests
- Check if a number is prime
- Flatten lists
- Roman Numerals
- Lambda expressions
- Print the first parameter
and so on.
The site is totally free and doesn't even require an email to create an account or for using it. However when you sign up you can then check other's peoples' solutions as well as participate in the ranking.
Check it out at https://www.hackinscience.org/
More Information
Related Articles
A Crash Course on Python By Google
YouTube Courses On C++, Python and Blazor
Fly Over the Moon With Microsoft And Python
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Microsoft's Generative AI For Beginners With JavaScript
05/08/2025
In this Github-based course provided by Microsoft, you'll learn how to build GenAI application using JavaScript.
Rubrik Introduces Agent Rewind To Undo AI Mistakes
22/08/2025
Rubrik has developed a tool that can be used to undo AI agent mistakes. Agent Rewind records every action and creates an audit trail back to the source prompt, so users can undo the actions when [ ... ]
- NIST Finalizes ‘Lightweight Cryptography’ Standard to Protect Small Devices
- Java Agent Development Kit Goes GA
- Google Jules Coding Assistant Now Available
- GitHub Adds Copilot Agents Panel
- Record Level Of Interest In Google Summer of Code 2025
- Python Still Growing - 2024 Developer Survey Results
- .NET Preview 7 Adds XAML Source Generator
- Amazon S3 Vectors Or PostgreSQL- Is This The End Of Specialized Vector Stores?
- .NET Aspire 9.4 Adds CLI Tool
- Go 1.35 Adds Experimental Garbage Collector
- A World First For Humanoid Robots
- Court Rejects Google's Appeal - An Epic Win
- Robot Mall, A Bejing 4S Store
Comments
or email your comment to: comments@i-programmer.info