top of page


Country Shortener Challenge


1 Easy

2 String Manipulation


Create a program where the user inputs the names of two countries. The program will output the first four letters of each country name in uppercase, separated by a hyphen.

Inputs: Two country names. Outputs: First four letters of each country in uppercase. Processes: String slicing and manipulation. Variables: country1, country2, short_country1, short_country2, result.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page