crimeHeatMap.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:IntroPython2016 作者: UWPCE-PythonCert 项目源码 文件源码
def main():
    geolocator = Nominatim()
    intro = True
    again = True

    print("This app will generate a crime heat map based on your location")

    while intro:
        introText = input("Would you like to enter a location (y/n) ")
        if introText.lower() == "y" or introText.lower() == "n":
            locationInfo = validLocation(geolocator, introText)
            intro = False

    raw_data = apiResults(locationInfo)
    mapMaker(raw_data, locationInfo)
    output(raw_data, locationInfo)

    while again:
        againText = input("Would you like to run the application again (y/n) ")
        if againText.lower() == "y" or againText.lower() == "n":
            again = False
        if againText.lower() == "y":
            main()
        else:
            print("Thanks! See you next time")
            SystemExit
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号