A simple logic game by python for beginners
A simple logic game by python for beginners
in this video contains a simple logic game
create a simple logic command line game
random module and string module
A simple logic building game for absolute beginners .
at first import module random and string then grab alphabets and random number for indexing
****** code *********
#### create a local game for competative exam
""" example
B,G,L then waht is the next ?
"""
## module random , string
import random
import string
alphabate=list(string.ascii_uppercase+string.ascii_uppercase+string.ascii_uppercase)
print(alphabate)
####random choice a number
num1=random.choice(range(26))
print(num1)
### condition 1 for question
def condition1():
alpha_one=alphabate[num1]
ran_num=random.choice(range(7))
alpha_two=alphabate[num1+ran_num]
alpha_three=alphabate[num1+ran_num+ran_num]
alpha_four=alphabate[num1+ran_num+ran_num+ran_num]
return alpha_one,alpha_two,alpha_three,alpha_four
####print question and answer
con2=condition1()
con=list(con2)
question="here are three letter so tell what is next letter: {},{},{}".format(con[0],con[1],con[2])
print(question)
ans=input("tell your ans what is the next letter :")
if ans.upper()==con[3] :
print("you are correct ")
else:
print("you are wrong")
******end code **********
more video:
how to get free ssl:
https://www.youtube.com/watch?v=6LYK5n1iay0&t=19s
free download django website about poll app:
https://www.youtube.com/watch?v=RPArC1uj5D4&t=10s
django admin tutorial :
https://www.youtube.com/watch?v=jSOKrzOKRoI
https://www.youtube.com/watch?v=sP5X-t4IA2I
https://www.youtube.com/watch?v=6UeuuSUtu_s
support the channel
LIKE || SUBSCRIBE || SHARE
#python #logic_game