110k views
0 votes
Create a new program in python that:

Defines a function called cities()

Ask the user how many cities they are in England and store their response in a variable called answer

Check if their answer was equal to 51

If it was, output well done!

else, output incorrect!

Calls the cities() function at the end to run it.

User Chiaro
by
6.9k points

1 Answer

2 votes

Answer:

here

Step-by-step explanation:

If you want to display something on screen you can use the print() function. ... An example of code that will ask the user to enter their name and display it on ... stores it in a variable called city city = input("What is the capital city of England ... If you want to perform a format check in Python you will need to make use of a library.

User Kaloer
by
7.1k points