import randomwhile attempt <=3:age = int(input(“please inputsmaller than the true value”) print (“larger than the true value”)
生成一个随机年龄(1~18岁),让用户输入年龄最多3次,如果输入与随机数相同,输出“
我用html制作了一个表单,其中包含两个输入字段first name和last name,并将required属性添加到输入类型标记中。我还制作了两个按钮Submit和View。如果两个字段都为空,则显示please fill out this field attribute消息。当我单击submit按钮时,表单中的数据使用php进入我的sql数据库,这很好。我希望输入类型标签的“必需”属性只对提交