Programming challenge
I haven’t done much programming since the course back in January so tonight I decided to tackle a CodeWof exercise. The task was to write a program that asks for a region and a country, and prints out {region} is in {country}.
I first tried asking the user for a region and a country. What kept confusing me was how to ask for that in the right order. Using repl.it was really helpful to test my code. The problem I was having was that I didn’t really need the programme to print “give me a region” or “give me a country”.
Given that the CodeWof test already had the region and country loaded all I need to code was to look for the input and write a variable for region and country. It’s early days for me with programming in this language so I don’t think I’m explaining things very well, but what matters is I solved it and passed the test. My final code is shown below.