Learn this knowledge and every programming language so you can earn for your own and be skillful , because I also passed 10th and focus on this to good job
#guessing the number n=20 print("you have 9 guesses") for i in range(1,10): g=int(input("Enter your guess")) if gn: print("Number is smaller than this") l=8-i print("Guesses left",l) elif g==n: print("CONGRATULATIONS YOUR GUESS IS CORRECT") print("NUMBER OF GUSSES TAKEN",i) break end="Game over" end=end.center(50) print(end)
num = 13 guess = 9 count = 1 print("You can guess only for 9 times ") while(True): a = int(input("Enter number: ")) if a > num: print("Enter a smaller number") elif a < num: print("Enter a larger number") else: print("Congratulations! Your guess is right and you use ", count , " guesses") guess = guess - 1 if guess == 0: print("You loose") break count = count + 1 if a != num: print("You have ", guess, "guess left")
winning_number=25 gusses_number=1 while(gusses_numberwinning_number: print('its big type smaller num.') elif n5): print("youer gusses chance are finish")
import random n=random.randint(0,20) p=0 i=9 while True: p=p+1 i=i-1 number=int(input("Enter your number ")) if number>n: print("try with a lesser value ") print("No of guess left ",i) elif number
print("FAULTY CALCULATOR") print("1.additon 2.subtraction 3.multiplication 4.division ") choice=int(input()) print("enter the first value ") n1=int(input()) print("enter the second value ") n2=int(input()) if choice==1: if((n1==56 or n2==56) and (n1==9 or n2==9)): print("the additon is 77") else: print("the addition is ",n1+n2) elif choice==2: print("the subtraction is ",n1-n2) elif choice==3: if((n1==45 or n2==45) and (n1==3 or n2==3)): print("the multiplication is 555") else : print("the multiplication is ",n1*n2) elif choice==4: if(n1==56 and n2==6): print("the division is 4") else: print("the division is ",n1/n2)
guess = 5 current_guess = 0 number = 18 while (guess>=0): guess = guess-1 current_guess = current_guess+1 inp = int(input("Enter a Number ")) if(inp==number): print("congratulations you have won the guess game in ",current_guess," Number of guesses") break elif(guess==0): print("Game over") break elif (inp>number): print("sorry give a bit more smaller number") print("you have ",guess,"guesses left") elif (inp
here it is-------> n=25 g=9 t=0 print("Guss the number--") v=int(input()) while (g>0): if(v==n): print("you did this ") g=g-9 print("end of the game") break elif(v
x=85 print("Let's Start our game of guessing number") i=0 while (True): print("GUESS A NUMBER") x1=int(input()) if (x1>x): print("Actual Number is lesser") i+=1 elif x1
Let me make it a little tricky import random x= 100 x = random.randint (1, 100) print("Let's Start our game of guessing number") i=0 while (True): print("GUESS A NUMBER") x1=int(input()) if (x1>x): print("Actual Number is lesser") i+=1 elif x1
winNo = 38 guesses = 9 one = 1 print("Welcome to the guess game. Please enter the answer you think is right below:-") while(True): answer = (int(input("Enter your guess here :- "))) if answer>winNo: print("Your number is greater than the answer (Hint- answer is not more than 60)") guesses = guesses-1 print("You have",guesses,"guesses left") if guesses == 0: print("Game over you lost.") break continue elif answer
n=18 print("enter guessed number") N1=int(input()) print('no. of attempts is 9') no_of_guesses=1 while(no_of_guesses18: print(" decrease down ur number ") break elif N1
hide = 50 print("welcome to the guess game you have to find hidden number you have 9 guess limits") count = 0 while(True): print("no of guess left>",9-count) guess = int(input("enter number:")) if guess==hide: print("congrats you won the game") count = count +1 break if count==8: print("your guess limit is over ") exit() elif guess>45 and guess 30 and guess < 70: print("you are near to the number ") count = count + 1 continue elif guess > 10 and guess < 90: print("you are still far to the number ") count = count + 1 continue else: print("u are so far ... ") count = count +1 continue print("you won this game after",count-1,'trails')
print(" you have 5 chances") i=5 while(i>=0): if i==0: print("game over") break a=10 i=i-1 q=int(input("Type value: ")) if q>a: print(i,"chance left , guessing no is smaller ") elif q
n = 18 guesses = 10 print("You will get 10 chances to guess the number") userInput = int(input("Enter a number: ")) while True: guesses -= 1 if guesses < 10: print(guesses, "guesses are left") if userInput < n: print("Entered number is Smaller, Try some big one :)") userInput = int(input("Enter a number: ")) if guesses == 1: print("0 guess left, Better luck next time") break elif userInput == n: print("Congratulations you have guess the number correctly :)") print("Number of guesses you have taken to guess:", 10 - guesses) break else: print("Entered number is Larger, Try some smaller one :)") userInput = int(input("Enter a number: ")) ############ Made by Kshitij ############
Harry Bhai this is Chirag I started a intern program in python . do mahine se office ja raha hunn par office me sare senior busy rehete hai apne project ko lekar . Me mechanical background se hunn to mujhe technically bahut problem ho rahi thi ye sab chije samajh ne me but Thanks to you itna simple language me python sikhane ke liye. par abhi mai thoda slow hunn mujhe raptar pakadne ke liye thoda assist kijiye .
THANK YOU Sir python sikhane ke liye pahle mujhe kuchh nhi aata tha but jab se aapke videos dekh rha hu bahut kuchh sikh gaya hoo than you very sir Name:- Brahmdev mahto class:- 9th from:- Indore
n=18 for i in range(0,10): num=int(input("enter guess:")) if num==n: print("YOU WON") print("guesses left:",(8-i)) break if num>n: print("THODA KAM KARO BHAI") print("guesses left:",(8-i)) if num
Bhai apne sab kuchh detail mein bolte ho aisa ki keyboard mein key kahan par hai ye bhi love u bhai from odisha 🥰🥰🥰, i want to learn coding and programming
import random n=random.randint(1,100) t=5 while(1): print("enter your guess you have ",t," chances left") x=int(input()) t=t-1 if t==0: print("you lose") break elif x==n: print("you won") break elif x
***In case of logical operators agar x and y hain to if x evaluates to True then result is y if x evaluates to False then result is x e.g. print(10 and 20), result => 20 print(0 and 20), result=> 0 agar or hai, like x or y to if x evaluates to True then result is x if x evaluates to False then result is y print(10 or 20), result => 10 print(0 or 20), result => 20
print("welcome to star party ") n = int(input("please input integar here in range of 10-> ")) b = n0: for s in range(n): print("*",end='') print(' ') n -= 1
n = 18 for i in range(1, 10): a = int(input("Enter a number: ")) if a > n: print("Entered no. is greater, try again!") print("No. of guesses left " + str(9-i) +" ") elif n > a: print("Entered no. is smaller, try again!") print("No. of guesses left " + str(9-i) +" ") elif n == a: print("Well Done!! The no. was " + str(n)) print("No. of guesses took " + str(i)) break
Bro please help i cant do exercises after even 10 times everytime i got error and i am watching your series regularly and praticing everything pls help😣😣😟
#Here, refer mine #totalg variable means total guesses left.. n = 18 totalg = 9 print("You have to guess a number(n) we setted up. Hint: It's less than 50 You have total of 9 guesses.") while(True): if totalg == 0: if x == n: print("Congo, your guess was right. You took all" + str(9 - totalg) + " guesses. ") break else: print("You ran out of guesses.") break x = int(input("Type here: ")) totalg = totalg - 1 if x > n: print("Number was greater than n. " + str(totalg) + " Guesses left ") elif x < n: print("Number was less than n. " + str(totalg) + " Guesses left ") elif x == n: print("Congo, your guess was right. You took " + str(9 - totalg) + " guesses.") break
guessNumber = 18 i = 0 totalRound = 5 while i < totalRound: i = i +1 print("Enter Number") n = int(input()) if i == totalRound: print("Game Over") elif n < guessNumber: print("Your Entered Number is Less than you have",totalRound-i,"chance") elif n > guessNumber: print("Your Enter Number is Greater than you have",totalRound - i,"chance") else: print("Congratulation you Won into",i,"Hit")
#Python Exercise 4: Astrologer's Stars n =int(input('Enter num1 = ')) n2 = int(input('enter num2 = ')) print("Enter 1 or 0 :") bool_val = input("1 for True value or 0 for False : ") if bool_val == '1': for row in range(n): for col in range(row+1): print('*',end=' ') print() if bool_val == '0': for row in range(n): for col in range(row): print('x',end=' ') print()
#Sagar L n = 18 g = 1 print("you have only 9 chance to guesses this number. ") while g 18: print("My Number is Less then " + str(choosenumber) + ", Don't Worry Enter again! ") elif choosenumber < 18: print("My Number is greater then " + str(choosenumber) + ", Don't Worry Enter again! ") else: print("Great you won the Game :)") print("you complete game in ", 9-g, "chance") break print(9-g,"chance left to win") g=g+1 if g>9: print("Game Over!")
n=50 print("Welcome to my window Lets start playing with the numbers ") print("You have 9 chances to guess the number") count=9 while(True): print('enter the number') i=int(input('')) if(count==0): print('you have exceded the number of tries') print('Thankyou ') break elif (i > n): print("you have enter a graeter number please choice a lesser number to win") count = count - 1 print(f'you have left with {count} choices ') if(count!=0): continue elif(i