Random Number Guess Game by Python - Python Program
Copy This Code
import random number=random.randint(10,50) ctr=0 while ctr<5: guess=int(input("Guess a number in range 10..50:")) if guess==number: print("You win!!:") break else: ctr+=1 if not ctr<5: print("You lose:(\n The number was",number)
Source code for row in range (7): for col in range(5): if ((col==0 or col==4) and row!=0) or ((row==0 or row==3) and (col>0 and col<4)): print("*",end=" ") else: print(end=" ") print()
genius
ReplyDelete