Text-based programming tasks - code submission
Example 1- Hello, World!
This is a simple task to illustrate the submission process and point out any special requirements for each particular programming language. There is only one correct answer. The code you submit will therefore be given a score of either 0 or 10.
Tasks begin with some background information and/or instructions. Below the task information, is the submission area. First write and test your program in your preffered IDE. Next select your preferred language from the dropdown menu and copy and paste your code into the text box below this. After checking your code has pasted in correctly and pressing the Submit button your code will be compiled and evaluated.
Have a look at the interface to get aquainted and then try writing a program and submitting your program. Your code should send the string "Hello, World!" to the standard output of your chosen programming language.
Try this out in a new window ...
Answers:
Language |
Filename |
Program |
C |
helloworld.c |
int main() { |
C++ |
helloworld.cpp |
#include <iostream> |
C# |
helloworld.cs |
using System; |
Haskell |
helloworld.hs |
main = putStrLn "Hello, World!" |
Java |
helloworld.java [class needs to have same name as file] |
class helloworld { |
Javascript |
helloworld.js |
console.log("Hello, World!") |
Kotlin |
helloworld.kt |
fun main(args : Array<String>) { |
Pascal |
helloworld.pas |
begin |
Python 3 |
helloworld.py |
print("Hello, World!") |
Ruby |
helloworld.rb |
puts "Hello, World!" |
Visual Basic |
helloworld.vb |
Module HelloWorld |
Example 1 - Hello, World!
Example 2 - Postfix
Exercise - Cat Words
Did you know the UK Bebras Challenge is run by the Raspberry Pi Foundation? Discover free teaching resources, tools, and expert support for computing education at raspberrypi.org.