题目的格式如下,题目和题目之间用“==”隔开,每个题目的“题干”,“选项”,“答案”用“*”号隔开

An administrator wants to provide users restricted access. The users should only be able to perform the following
tasks:
- Create and consolidate virtual machine snapshots
- Add/Remove virtual disks
- Snapshot Management
Which default role in vCenter Server would meet the administrator's requirements for the users?
*
A. Virtual machine user
B. Virtual machine power user
C. Virtual Datacenter administrator
D. VMware Consolidated Backup user
*
B
==
Which two roles can be modified? (Choose two.)
*
A. Administrator
B. Network Administrator
C. Datastore Consumer
D. Read-Only
*
BC

#Auther Bob
#--*--coding:utf-8--*--
import time
import random
score = 0 #记录分数,答对一题加10分,打错不扣分
y = [] #定义一个list,主要放已经答过的题目,如果在该list中,则跳出这次循环开始下一次循环
temp_int = 0 #统计循环的次数,如果所有题目全部打完,则退出循环
exam_list = [] #定义一个list,该list主要是生成题目的序号
temp_list = [] #定义一个list,把所有的题目放在一个list中
l2 = [] #定义一个list,把所有的题目按照“===”分割,每个题目作为一个该list的一个元素
correct = 0 #定义答错的题目的数量
fail = 0 #定义答对的题目的数量 exam_dict = {} #定义一个dict,格式化如下{序号:{题目:“题目内容”,选项:“选项内容”,答案:“答案内容”}}
for i in range(242):
exam_list.append(i) with open("exam","r",encoding="utf-8") as f:
for line in f:
temp_list.append(line)
temp_str = "".join(temp_list)
l2 = temp_str.split("==")
for a in exam_list:
l1 = l2[a].split("*")
temp_dict = {a:{"题目":l1[0],"选项":l1[1],"答案":l1[2]}}
exam_dict.update(temp_dict) while True:
r = random.randrange(0,242)
if temp_int == 242:
test_num = "你一共测试了%d道题,答对%d,答错%d" %(temp_int,correct,fail)
test_score = "你的分数是%d." %(score)
print(test_score)
print(test_num)
exit() else:
if r in y:
continue
else:
g = "good"
f = "failed"
temp_int = temp_int + 1
y.append(r)
tmp_num = "这是第%d道题." % (temp_int)
print(tmp_num)
print(exam_dict[r]["题目"])
print(exam_dict[r]["选项"])
temp_option = input("you choice:")
option = temp_option.upper()
s = set()
b = set()
for i in option:
s.add(i)
for c in exam_dict[r]["答案"].strip():
b.add(c)
if s == b:
gg = g.center(100,"=")
print(gg)
correct = correct + 1
test_num = "你一共测试了%d道题,答对%d,答错%d" % (temp_int, correct, fail)
print(test_num)
score = score + 10 else:
ff = f.center(100,"=")
print(ff)
fail = fail + 1
time.sleep(10)
print(b)
test_num = "你一共测试了%d道题,答对%d,答错%d" % (temp_int, correct, fail)
print(test_num)
time.sleep(15)

  

  

  

  

VCP考试系统的更多相关文章

  1. 分享一个LiteDB做的简单考试系统辅助工具

    凌晨,被安排在公司值班,因为台风“灿鸿”即将登陆,风力太大,办公楼,车间等重要部分需要关注.所以无聊,那就分享一下,今天给朋友临时做的一个小的考试系统辅助工具吧.其实非常小,需求也很简单,但是可以根据 ...

  2. 基于ssh框架的在线考试系统开发的质量属性

    我做的系统是基于ssh框架的在线考试系统.在线考试系统有以下几点特性:(1)系统响应时间需要非常快,可以迅速的出题,答题.(2)系统的负载量也需要非常大,可以支持多人在线考试(3)还有系统的安全性也需 ...

  3. WSB功能分解(在线考试系统)

    对在线考试系统进行WSB功能分解至三级子功能,并且预估每个子功能所需时间. 一级功能 二级功能 三级功能 预估花费时间(小时) 考试管理员功能模块 培训计划 查询 1.5 重置 1 新增计划 1.5 ...

  4. 在线考试系统(Online Exam System)--ASP.NET

    用户设计 -|学生 -|老师 -|管理员 学生结构设计 -|个人信息管理 -|修改个人信息 -|修改登录密码 -|选课中心 -|显示所有老师所开课的信息可进行选课 -|显示自己已选课程 -|在线考试 ...

  5. Bug测试报告--在线考试系统--金州勇士

    项目名:在线考试系统 组名:金州勇士 测试者:宫丽君(nice!团队) 代码地址: ssh:git@git.coding.net:handsomeman/examm.git     https://g ...

  6. 驾照理论模拟考试系统Android源码下载

    ‍‍‍驾照理论模拟考试系统Android源码下载 <ignore_js_op> 9.png (55.77 KB, 下载次数: 0) <ignore_js_op> 10.png ...

  7. JavaWeb项目开发案例精粹-第3章在线考试系统-007View层

    0.login.jsp <%@ page language="java" import="java.util.*" pageEncoding=" ...

  8. zzzzw_在线考试系统①准备篇

    在弄完购物系统之后,小博也了解了解怎么用struts这个框架捣鼓一个在线考试系统 购物系统用的是MVC模式,现在这个struts2原理上也是基于MVC模式的.那么要做这个东西之前先了解一下难点在哪里 ...

  9. smarty练习:考试系统

    考试系统 (0607) 做一个类似于驾校考试的系统,可以选择要考试试题类型,选好后进入考试页面 使用的数据库表格:timu(题目)表,xuanxiang(选项)表,shiti(试题)表,shititi ...

随机推荐

  1. 检测2个公网IP的GRE隧道是否通的方法,使用PPTP拨号检测。

    检测2个公网IP的GRE隧道是否通的方法,使用PPTP拨号检测. 因为PPTP是建立在GRE隧道基础上的. PPTP 防火墙开放 TCP 1723防火墙开放 IP protocol 47,即GRENA ...

  2. ossim 4.1 安装

    在这说明一下,本人也是第一次安装这东东很多我自己也不懂,只能把自己的安装步骤通过贴图呈现出来了!!!! 我用root用户登录的,顺便查看ip 在浏览器打开网址https://192.168.86.15 ...

  3. solr的multivalued使用说明

    solr的schema.xml配置文件在配置Filed的时候,有个属性: MutiValued:true if this field may containmutiple values per doc ...

  4. jmeter测试20个QPS下的响应时间-设置QPS限制

    添加--->定时器--->Constant Throughput Timer Constant Throughput Timer 的主要属性介绍: 名称:定时器的名称 Target thr ...

  5. 手机端移动端的选择框mobileSelect.js使用

    手机端移动端的选择框mobileSelect.js使用 文件地址:https://github.com/onlyhom/mobileSelect.js 请感兴趣的自行下载 使用过程 1 引入标签 &l ...

  6. api 1.1构架篇

    首先让其自动加载??? 在YiiBase.php里面 改写autoload方法:     /**     * Class autoload loader.     * This method is p ...

  7. ASP.NET CMS: Administration Template

    ASP.NET CMS: Administration Template For many creating advanced ASP.NET website or application admin ...

  8. 7. myeclipse10反编译插件安装

  9. jpa 一对多and 多对一

    配置: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2 ...

  10. thymeleaf的使用

    1.导包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp ...