My journey to be an engineer

             My journey to be an engineer       Deterrents had never been hindering my push to prevail throughout everyday life. As an engineer to be, it is essential to me to be ready for obstacles in reality. The world these days needs an individual who could contend and has incredible capacities to remain on a similar level as others. Different abilities and basic assessment of an issue are fundamental for a specialist to bounce into this difficult vocation. As per me, an essential arranging and full planning to accomplish the point of being a specialist engineer.  To achieve my objective, it is indispensable to reflect myself and make an activity in expanding my adequacy and arriving at my latent capacity. 4000 miles from old neighborhood are a penance that I had made for a degree as well as more than that.  Moreover, I have an issue to track down the central issues and significant realities during the talks, and I'm burning through my time recording the focuses which excessive

Simple dice game-Python






In this article we will create a classic rolling dice simulator with the help of basic Python knowledge.
Here we will be using the random module since we randomize the dice simulator for random outputs.





program/code:


import random
def inp(s):
    i=input(s)

for x in i:
        if((ord(x)>=48) and (ord(x)<=57)): 

        pass
else:
       print("\nINVALID INPUT \nInput must be a integer  ")

       return(inp(s))

return i
def dies(x):
    if(x==1):

        print(" ___")

        print("|       |")

        print("|   x   |")

        print("|       |")

        print("|___|")

   elif(x==2):

        print(" ___")

        print("|       |")

        print("| x   x |")

        print("|       |")

        print("|___|")

    elif(x==3):

        print(" ___")

        print("| x     |")

        print("|   x   |")

        print("|     x |")

       print("|___|")

    elif(x==4):

        print(" ___")

        print("| x   x |")

        print("|       |")

        print("| x   x |")

        print("|___|")

    elif(x==5):

        print(" ___")

        print("| x   x |")

        print("|   x   |")

        print("| x   x |")

        print("|___|")

    elif(x==6):

        print(" ___")

        print("| x   x |")

        print("| x   x |")

        print("| x   x |")

        print("|___|")

def ran():
    r=random.randrange(1,7)

    return r

nn=int(inp("Enter number of dies to roll : "))
n=int(inp("Enter number of times to roll : "))
for c in range(n):
    m=input("\nPress Entre ")

    a=[]

    for i in range(nn):

        a.append(ran())

    for x in a:

        dies(x)

        print()

    print("Sum is :",sum(a))

print("\n\tTHE END")
print("\nHAPPY CODDING")




  									

RUN ON DCODER




Comments

Post a Comment

Popular posts from this blog

Digital marketing

My journey to be an engineer

AFFILIATE MARKETING