#!/usr/bin/python
# -*- coding: UTF-8 -*-
import random,os
#设置试卷、答案存放路径
testPath='F:\\Test'
answerPath='F:\\Answer'
#判断路径是否存在,若不存在则创建一个
if not os.path.exists(testPath):
os.mkdir(testPath)
if not os.path.exists(answerPath):
os.mkdir(answerPath)
#将测试数据保存在一个字典中,key为州名,value为首府名
capitals = {'Alabama': 'Montgomery', 'Alaska': 'quesNumuneau', 'Arizona': 'Phoenix',
'Arkansas': 'Little Rock', 'California': 'Sacramento', 'Colorado': 'Denver',
'Connecticut': 'Hartford', 'Delaware': 'Dover', 'Florida': 'Tallahassee',
'Georgia': 'Atlanta', 'Hawaii': 'Honolulu', 'Idaho': 'Boise', 'Illinois&#