Share your repls and programming experiences

← Back to all posts
I can guess the capital city!
BabyPenguin737

This is a very simple Python Program, where the computer will ask for your name, age and favourite colour. Then you can choose a country, and the computer will tell you the Capital City corresponding to the Country you chose.
Hope you enjoy!

Voters
BabyPenguin737
Comments
hotnewtop
badst

Try and use fstrings, they're more efficient.
For example, line 2: print('Hi, %s.' % name)
can be replaced with print(f'Hi, {name}')