import java.util.*; public class caizi{ public static void main(String[] args){ Scanner in=new Scanner(System.in); Random MyRandom=new Random(); int A=MyRandom.nextInt(101); int number; do{ System.out.println("请猜一下电脑随机生成的数"); number=in.nextInt()…
17.5 The Came of Master Mind is played as follows: The computer has four slots, and each slot will contain a ball that is red (R), yellow (Y), green (C) or blue (B). For example, the computer might have RGGB (Slot # 1 is red, Slots #2 and #3 are gree…
import randomx = random.randint(0,99)while(True): num = input("please input a number\n") if(num.isdigit): num = int(num) if(x == num) : print("congratulations,you are winner!") break elif(x > num): print("you guess a little sma…