Print question on the loop before printing options
@cr7johnChan Жыл бұрын
I did not exactly know what the question was all about but here is a try questions = { "What is the capital of India": "Delhi", "What is the National Bird of India": "Peacock", "What is the National Animal of India": "Tiger", "How many states are there in India": "28", } Options = [ ["Delhi", "Kolkata", "Mumbai", "Chennai"], ["Pigeon", "Crow", "humming bird", "Peacock"], ["Elephant", "Lion", "Tiger", "Liger"], ["9", "28", "31", "23"], ] # print(len(questions)) l = len(questions) i = 0 for key, value in questions.items(): # print(key) # print(value) ans = input(f"{key}?{Options[i]}: ") i = i + 1 if value == ans: continue else: print("You are out") break
@knowledgstand2.0 Жыл бұрын
Your code is better than Harry
@shaikshahed413 Жыл бұрын
Nice bro
@Rajveer__singhhhh Жыл бұрын
Really better than Harry bhai osm great work❤
@pluto74024 ай бұрын
This is good but it would be better if it takes input in form of alphabet or number. For example, you can mark the options as alphabets and instead of using the words as values, you can use the option as the value. Tbf, lists will work much better here than dictionaries, cuz of various reasons but whatever suits you best i guess.
@coolATHARV0010 Жыл бұрын
only legends know that questions are not printed but still love u bhai
@SaathwikKolla-ij6bz Жыл бұрын
yes me breaking head to find the questions
@-PShreyanshKarna Жыл бұрын
print(f"{question[0]}") adding this section will solve ,the value of index 0 for questions.
@vegetable144410 ай бұрын
LOL
@umangpanchal83655 ай бұрын
@blackshadowgaming88935 ай бұрын
Lfuck
@BlackStarGalaxyyАй бұрын
This was my approach to the problem: questions = ["Current Railway Minister of India is", "Which god is also known as ‘Gauri Nandan’?", "What does not grow on tree according to a popular Hindi saying?", "Which city is known as the Pink City of India?", "Who wrote India's National Anthem?", "How many major religions are there in India?", "When is the National Hindi Diwas celebrated?", "How many states are there in India?", "Where is India Gate located?", "Who wrote Vande Mataram?"] optionA = ['Mamta Banarjee', 'Agni', 'Money', 'Banglore', 'Rabindranath Tagore', 6, '13 September', 28, 'Agra', 'Sarat Chandra Chattopadhyay'] optionB = ['Ram Vilash', 'Indra', 'Flowers', 'Maysore', 'Lal Bahadur Shastri', 7, '14 September', 29, 'Punjab', 'Rabindranath Tagore'] optionC = ['Ashwini Vaishnaw', 'Hanuman', 'Leaves', 'Jaipur', 'Chetan Bhagat', 8, '14 July', 31, 'Mumbai', 'Bankim Chandra Chatterjee'] optionD = ['Piyush Goyal', 'Ganesha', 'Fruits', 'Kochi', 'RK Narayan', 9, '15 August', 32, 'New Delhi', 'Ishwar Chandra Vidyasagar'] answers = ['Ashwini Vaishnaw', 'Ganesha', 'Money', 'Jaipur', 'Rabindranath Tagore', 6, '14 September', 28, 'New Delhi', 'Bankim Chandra Chatterjee'] rewards = [0, 1000, 2000, 3000, 5000, 10000, 20000, 40000, 80000, 160000, 320000] reward = 0 number_of_correct_answers = 0 def answer_index_check(a): if a == 1: Index_answer = optionA[i] if a == 2: Index_answer = optionB[i] if a == 3: Index_answer = optionC[i] if a == 4: Index_answer = optionD[i] if Index_answer == answers[i]: return 1 else: return 0 for i in range(len(questions)): print(f"{questions[i]} Option A: {optionA[i]} Option B: {optionB[i]} Option C: {optionC[i]} Option D: {optionD[i]}") answer = input("please enter your answer here: ") try: answer = int(answer) except: answer = answer.title() try: if answer == answers[i] or answer_index_check(answer) == 1: print("Correct Answer!") reward = reward + 1 else: print("Wrong Answer!") except: print(f"Wrong Answer! The correct answer is {answers[i]}") if reward > 0: print(f"Congratulations! You have won {rewards[reward]} !!!") else: print("Sorry but you didn't get any answer correct!")
@AbhiYadav-is2je Жыл бұрын
Question ka price to h pr question hi nhi sirf option hi h😂😂
@niteshgupta8462 Жыл бұрын
In Harry bhai code to print the question after for loop that:- Question=(Questions [i]) This will make your program to print questions of KBC
@Deveshhmaheshwari Жыл бұрын
@@niteshgupta8462 its not working can you elaborate
@niteshgupta8462 Жыл бұрын
@@Deveshhmaheshwari Bro you can use replit to get the code easily but the thing is that I had also tried many time to run code using different method but it was not going as smooth as we want with options
@Tanusaklani Жыл бұрын
@@niteshgupta8462simply add a line above the options .....print(question[0])😅
@Anonymous780- Жыл бұрын
print(f"question [0]") Aaka question aa jayega❤
@satpalyadav7977 Жыл бұрын
BRO YOUR ARE THE BEST TEACHER I EVER HAD
@ozge-yagizfan Жыл бұрын
Great way of doing this exercise in logical simple way
@meherajalisardar5583 Жыл бұрын
i=0 for i in range(14): print('Question Kidhar hai?')
@SHADOW-pr4tp10 ай бұрын
hahahaha
@AnujKumar-zi6iy5 ай бұрын
i = 0 likhne ki zarurat nahi thi
@takshbhatt14717 күн бұрын
# Exercise - 3 Kaun Banega Crorepati questions = [ "Who wrote the Indian national song?", "What is the capital of Australia?", "Which planet is known as the Red Planet?", "Who discovered gravity?", "What is the largest mammal in the world?", "Which element has the chemical symbol 'O'?", "Who is known as the father of the Indian Constitution?", "Which language is primarily used in Android app development?", "What is the main ingredient in sushi?", "Who painted the Mona Lisa?" ] options = [ ["A. Rabindranath Tagore", "B. Sarojini Naidu", "C. Mahatma Gandhi", "D. Subhas Chandra Bose"], ["A. Sydney", "B. Melbourne", "C. Canberra", "D. Perth"], ["A. Jupiter", "B. Mars", "C. Venus", "D. Mercury"], ["A. Albert Einstein", "B. Galileo Galilei", "C. Isaac Newton", "D. Nikola Tesla"], ["A. African Elephant", "B. Blue Whale", "C. Great White Shark", "D. Giraffe"], ["A. Gold", "B. Oxygen", "C. Silver", "D. Carbon"], ["A. Jawaharlal Nehru", "B. B. R. Ambedkar", "C. Sardar Patel", "D. Rajendra Prasad"], ["A. Python", "B. Java", "C. C++", "D. Kotlin"], ["A. Rice", "B. Noodles", "C. Fish", "D. Bread"], ["A. Pablo Picasso", "B. Vincent van Gogh", "C. Leonardo da Vinci", "D. Michelangelo"] ] answers = ["A", "C", "B", "C", "B", "B", "B", "D", "C", "C"] print("Let's play Kaun Banega Crorepati.") print("Rules : You'll get 10 lakhs for every correct answer. Give answer in A,B,C or D") win_amount=0 for i in range(0,10): print(" Question",i+1,":-") print(questions[i]) for opt in options[i]: print(opt) ans=input(" Give the answer (A,B,C or D) : ") while ans not in answers: print("Please enter valid answer.") ans=input(" Give the answer (A,B,C or D) : ") if(ans.upper()==answers[i]): win_amount+=1000000 print("Correct Answer !") print("Current Winning Amount :",win_amount) else: print("Incorrect Answer !") print("Your winning amount is",win_amount,"rupees.") break; if(win_amount==10000000): print("Congrats you became crorepati!")
@adityapradhan8474 Жыл бұрын
Ye exercise krne me bohot mazza aaya tha!
@msvideos57844 ай бұрын
questions = [ ["1.What is the Capital of Pakistan", "1.Karachi", "2.Islamabad", "3.Lahore", "4.Peshawar", 2], ["2.The International Literacy Day is observed on ", "1.Sep 8", "2.Nov 22", "3.Oct 24", "4.Dec 12", 1], ["3.What is the national Language of Pakistan ", "1.English ", "2.Hindi", "3.Urdu", "4.Siraiki", 3], ["4.What is the main advantage of online education?", "1.Lower Cost", "2.Flexible Schedule", "3.Wide range of programs", "4.All of the above", 4], [ "5.Which standardized test is commonly used for college admissions in the United States?", "1.GRE", "2.SAT", "3.GMAT", "4.LSAT", 2], ["6.Which educational theory focuses on learning through observation and imitation?", "1.Behaviorism ", "2.Constructivism", "3.Social Learning Theory", "4.Cognitivism", 3], [ "7.Who is known as the father of modern education?", "1.John Dewey", "2.Johann Heinrich Pestalozzi", "3.Friedrich Froebel", "4.Horace Mann", 4], ["8.Which term refers to the incorporation of technology in teaching to enhance learning?", "1.Educational Technology", "2.Digital Learning", "3.Blended Learning", "4.All of the Above", 4], ["9.Which type of assessment is designed to measure a student's knowledge and skills" " at the end of a unit or course?", "1.Formative Assessment", "2.Summative Assessment", "3.Diagnostic Assessment", "4.Informal Assessment", 2], ["10.Which of the following is considered a primary education level?", "1.Kindergarten to 5th grade", "2.6th Grade to 8th", "3.9th Grade to 12th ", "4.Undergraduate", 1], ] rewards = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000] money = 0 for i in range(len(questions)): choose = questions[i] print("Choose the correct answer") print(choose[0]) print(f"{choose[1]} {choose[2]}") print(f"{choose[3]} {choose[4]}") answer = int(input("Enter your choice (1-4): ")) if answer == choose[5]: # we sign index 5 because we write answer in the list in index 5(choose[5] money = money + rewards[i] print(f"Correct answer, you win Rs.{rewards[i]} ") else: print("Incorrect answer! ") break print(f"Game Over!, Your total Reward is {money}")
@itsrxon Жыл бұрын
Thnks for the video harry bhaiya
@saifabidi01 Жыл бұрын
print("Welcome to Kaun Banega Crorepati ") one = int(input("Enter press one (1) is keyboard and play the game")) match one: case 1: print("What is the capital of India") print("Your option is (Delhi),(Lucknow),(Mumbai),(Kolkata)") option = 1 print("(press 1 for Delhi),(press 2 for Lucknow) ,(press 3 for Mumbai), (press 4 for Kolkata)") answer = int(input("Enter your Answer")) if (option==answer): print("Congratulation your Answer is correct") second = int(input("press Two (2) and you enter in Second Round")) match second: case 2: print("who is prime minister of india ") print("Your option is (Indira Gandhi),(Gulzarilal Nanda),(Lal Bahadur Shastri),(Narendra Modi)") print("(press 1 for Indira Gandhi ), (press 2 for Gulzarilal Nanda), (press 3 for Lal Bahadur Shastri), ( press 4 for Narendra Modi )") answer = int(input("Enter your Answer")) option = 4 if(option==answer): print("Congratulation your Answer is correct") else: print("Wrong Answer")
@fanciedinterface1616 Жыл бұрын
i also did it through if else but isi'nt it too long?
@anant5065 Жыл бұрын
My code was way more efficient and maintainable!!! Really happy!
@HaisamJan-h5r10 ай бұрын
Please share with us here🎉🎉🎉🎉
@vatsalsharma40619 ай бұрын
def inp() : opt=['a','A','b','B','c','C','d','D','`'] while (True) : x=input("answer: ") if(opt.count(x)>0) : return x else : print("Answer can only be A OR B OR C OR D") que=["Who heads the RBI?","Who created Bitcoin?","What is the national flower of India?","What is the highest mountain peak in Indian Subcontinent?","What is the national sport of India?"] opt1=["a)Governor","a)Satoshi Nakamoto","a)Lily","a)Mount Denali","a)Baseball"] opt2=["b)Prime minister","b)Sam Altman","b)Lotus","b)K2","b)Football"] opt3=["c)President","c)Einstein","c)Rose","c)Mount fuji","c)Hockey"] opt4=["d)All of above","d)Vatsal Sharma","d)None of these","d)Mount Everst","d)Cricket"] ans=[['A','a'] , ['A','a'] , ['B','b'] , ['D','d'] , ['C','c'] ] money=["0","1,000","2,000","10,000","15,0000","1,00,000"] print("press'`' to exit") for i in range(1,6) : print("Money on line:", money[i]) print(que[i-1]) print(opt1[i-1],opt2[i-1],sep=" ") print(opt3[i-1],opt4[i-1],sep=" ") l=inp() # print(ans[i-1]) if(ans[i-1].count(l)>0) : print("your answer is correct") print("congratulation you won so far:", money[i]) if(i==4) : print(" do you want to play last round if you lose you will only win 10,000") m=input("'a' to play and 'b' to quit: ") if(m=='a' or m=='A') : continue elif(m=='b'or m=='B') : print("money won",money[i]) break else : print("input can only be 'a' or 'b'") elif(l=='`') : print("congrats you won",money[i-1] ) break else : print("your answer is wrong") if ans[i-1][0] == 'A' : print("correct answer is:",opt1[i-1]) elif ans[i-1][0] == 'B' : print("correct answer is:",opt2[i-1]) elif ans[i-1][0] == 'c' : print("correct answer is:",opt3[i-1]) elif ans[i-1][0] == 'D' : print("correct answer is:",opt4[i-1]) print("total money won: ",money[2*((i-1)//2)]) break print()
@Aditya_Vyas Жыл бұрын
Yahi pe peel deya....Ohh Bhai kya he mast video hai ye
@anonymous____________________4 Жыл бұрын
Pranam bhrata 🙏 apka bahutt baht dhanyawad 😄🧡😇🙏
@kabyadeepdutta4228Ай бұрын
a=input("Enter your name: ") print(a, "Welcome to kaun bane ga crorepati") print() q={"What is the capital of India":"Delhi", "What comes after 4":"5" } print() op=[[ "Mumbai","Delhi","Kolkata","Assam" ], ["2","3","5","6"], ] levels=[10,20] i=0 for key, value in q.items(): print("question for Rs.",levels[i]) print(f" {key}?") for j in range(0,len(op)): d = op[i] print(f"a.{d[0]} b.{d[1]}") print(f"c.{d[2]} d.{d[3]}") ans=input(" Enter your answer: ") i += 1 if value==ans: print(" correct answer") print() continue else: print("wrong answer ") break Someone please solve my problem my options are repeating 2 times😢
@lakshyathakur55334 ай бұрын
updation of money=levels[i] will also come after line print(f"Correct answer, you have won Rs. {levels[i]}"),so that at last when we print your take home money is{money}, this money amount gets updated
@sunilpawar820310 ай бұрын
bhaii starting bahot hi jada badiya thi i just loved it
@s8ul_for_lifee Жыл бұрын
question = ["What is your name", "what is your age", "what is your profession"] answer = ["siddhesh", "20", "student"] a = 0 b = 1 c = 0 for i in question: print(i) s = input("Enter your answer: ") if (s == answer[a]): c = c + (200 * b) print("You won $", 200 * b) a = a + 1 b = b + 1 else: print("You loose") break if (c > 0): print("Total amount you won : ", c) else: print("You won $0")
@abiranjan_8Ай бұрын
Id=input("enter the id:") if(id=='quit'): Print("true") Else: raise ValueError("invalid")
@tonykrafton2205 Жыл бұрын
Got enjoyed ! 😁😁
@aseem3112Ай бұрын
Using Dictionaries questions = { "1. What is the maximum length of a Python identifier?":{ 'options': ["A. 32" ,"B. 16", "C. 132", "D. Not Fixed"], 'answer' : 'D' }, "2. How is a code block indicated in Python?":{ 'options': ["A. Brackets" ,"B. Indentation", "C. Key", "D. None of the above"], 'answer' : 'B' } } for question, options in questions.items(): # indexing using items() to access key and values print(question) for option in options['options']: # accessing options print(" ", option) user_answer = input("Your answer: ").upper() if user_answer == options['answer']: # check whether answer is correct print("Your answer is Correct!!!!") else: print(f"The Correct answer is: {options['answer']}")
@mr_roshann__92 Жыл бұрын
Here is a issue in this code the correct logic is - replay = input(" Enter 0 for exit or Choose option : ") if replay == "0": money = level[i-1] break if (replay.lower() == question[-1]): print(f'"Sahi Jawab you have won {level[i]}" ') if i == 4: money += 10000 elif i == 9: money += 320000 elif i == 14: money += 10000000 else: print("Aapka jawab galat hai!") break; print(f"Your take home money is {money}")
@fact_girl01 Жыл бұрын
a=int(input("enter a number betwwn 9 and 5")) str(a)=="quit" if str(a)=="quit": print("ok") elif(5
@otherself-tb9st7 ай бұрын
@fact_girl01 It won't work as if you input any string it will give error that str cannot be changed to int type.
@deorirandomcreation Жыл бұрын
Sir please build a latest roadmap for a CSE student (for ex- which languages should we learn , what are the things we should do and dont ) please🙇
@vishaljoshi7752 Жыл бұрын
do everything just don't waste time learn any language first just a language then pratic basics after that jump to dsa and start solving esey dsa problems and start working on projects it's very imp.
@vishaljoshi7752 Жыл бұрын
important is problem solving skills not language
@username_taken_se_pareshan_boi Жыл бұрын
@@vishaljoshi7752 yes... Python sikho fir jitne projects pr kaam kr sko utne kro
@Rimham-p7g Жыл бұрын
@@vishaljoshi7752 agreeee
@PiyushKumar-nj7sh Жыл бұрын
bahi already itne roadmaps hai
@AyuRoboHack Жыл бұрын
# code to build your personal assistant #speak "hello" to activate import time import pyautogui as pt import pyttsx3 import speech_recognition as sr from googlesearch import search import webbrowser def male(speak):#male voice engine = pyttsx3.init() # object creation """ RATE""" rate = engine.getProperty('rate') # getting details of current speaking rate engine.setProperty('rate', 150) # setting up new voice rate """VOLUME""" volume = engine.getProperty('volume') #getting to know current volume level (min=0 and max=1) engine.setProperty('volume',1.0) # setting up volume level between 0 and 1 '''VOICE''' voices = engine.getProperty('voices') #getting details of current voice #engine.setProperty('voice', voices[0].id) #changing index, changes voices. o for male engine.setProperty('voice', voices[1].id) #changing index, changes voices. 1 for female engine.say(speak) engine.runAndWait() engine.stop() while True: r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) start=r.recognize_google(audio,language='eng-in') if (start=="hello"): male("hello sir i an active now") male("how can i help you") s = sr.Recognizer() with sr.Microphone() as source: #print("Say something!") audio = s.listen(source) query=s.recognize_google(audio,language='eng-in') male("voice recognition successfull please wait a second") #print("query") a=search(query,num=1) for i in a: webbrowser.open_new_tab(i) #if lower("youtube") in query: time.sleep(5) pt.press("k") break else: male("sorry your access denied") break
@dattebayo3034 Жыл бұрын
this exercise was bit tough
@sagarpathak7569 Жыл бұрын
output me questions display nahi ho rahe he....Answer kese bataoge for those who has the same question: Add -------print(question[0])-------in the loop
@swatbaba6619 Жыл бұрын
Can you explain why we are using only "[-1] in (if reply==question[-1] ?
@abdul_moiz_78 ай бұрын
Thank you so much for your time Harry bhai. This course is amazing!
@red66794 ай бұрын
score=0 q=["what is 2+2","what is the capital of india"] a=["4","Delhi"] p=[1000,2000] for i in range(0,len(q)): print(q[i]) respond=input("enter the answer") if respond==a[i]: print(f"you won {p[i]} ") score=score+p[i] else: print("you lost ") print("your score is", score) break
@SurajPandey-r3d Жыл бұрын
print("welcome to kbc") print("the first question is of rupees . 10000") a=input("who is the first prime minister of india ") option_a="modi ji" option_b="amit ji" option_c="vk" option_d="pt.nehru ji" if a=="option_d": print("congratulation u have won the rupees 10000.") elif a==("option_a") or a== ("option_b" ) or a== ("option_c") : print("wrong answer") else: print("sorry") sbse easy way me h
@techstandyt Жыл бұрын
Nice yaar ek number edit: ajkal Spiderman ka harry Osborn coding krra h wow!
@YashRathore-h3f5 ай бұрын
For question add a line before Print(f'' question for Rs.{levels[i]"} Above this line add Print(f'' question for for {questions[i]"}
@AmitSharma-oh5uw Жыл бұрын
harry bhaiya your video is so amazing and also full with fun 😉😉😋😋😂😂😂😂😂. you are looking so good in KBC
@harshalkusalkar Жыл бұрын
I tried to make this program by my self but after spending lot of time on the programming i failed many times but this is perfect for me because as a beginner I will understand many things as time passes and really thanks to harry to taught me this
@AmanVerma2009 Жыл бұрын
same bro
@Ifightformen Жыл бұрын
that's true bro !
@Rajeshhh Жыл бұрын
I too, but little late...
@AjitKumar-ni2vc Жыл бұрын
I maked the game but was not able to make options
@GoGetSP5 ай бұрын
Same here.
@infamous_SUSIL Жыл бұрын
Bhai me to dar Gaya iss video ka starting se
@GP._.Gaming-live Жыл бұрын
I am in class 9 only and I am in episode 9 with all the things you told i remember thank u
@satyamsingh22 Жыл бұрын
Epic dialogue of the day:- Yahi pe pel diya bhai ne😂😂😂😂😂 I have Watched that funny part many times, and still gonna see whenever i feel to laugh.😂😂😂 And thank you so much harry bhai for this hundred days of coding. Aap bhi welcome mann me matt kehna yahi comment me reply pel dena 😂😂😂😂😂
@shaikhmohammednauman5778 Жыл бұрын
for real 🤣🤣🤣🤣🤣
@digi_aayu Жыл бұрын
Kaha pe bola hai bhai timestamp dena please
@ShivamSingh-to7uz Жыл бұрын
@@digi_aayu hii this is satyam Singh from another id, 21:18 this is the time where you will find that dialogue 🤣😂🤣🤣😂
@reelsforyouofficial7 ай бұрын
n = input("enter alphabet") if n!= "quit": raise SyntaxError("entered alphabet is not accpetable")
@rajbir.soc0 Жыл бұрын
I can't imagine i learnt programming by his tutorials and now I can write more efficient code than him.
@rohanrajput_9 Жыл бұрын
how do you know that? He never showed his full potential he is just giving easy tutorials for beginners, I don't mean any offence but its better not to consider yourself too smart
@rajbir.soc0 Жыл бұрын
@@rohanrajput_9 thx that stuff just got out of my mind ig he could surely make much more efficient code.
@Motivation1234j Жыл бұрын
Bro didn't saw Harry's coding potential 💀
@eashovon Жыл бұрын
Present From Bangladesh Brother.....#Day39 Done
@asusankit42319 ай бұрын
Day 4 video 39
@parmardeep2889 Жыл бұрын
: It's Kaun Banega Code-pati 😁😛
@mdsohanurrahmanhridoy1343 Жыл бұрын
#Completed DAY#39/100 Love from Bangladesh...😍
@usamamatloob99504 ай бұрын
Hello bro , How are you?
@mdsohanurrahmanhridoy13434 ай бұрын
@@usamamatloob9950 good...
@CodingDork-oj9ew2 ай бұрын
Ekhon ki obostha vai
@amit-jx5lh8 ай бұрын
Very good Harry bhaiya ❤❤ I am loving this series
@cruelfarter99768 ай бұрын
I respect ur method but I felt this was easier for me t="Kaun Banega crorepati" print(t.upper()) question1=("Who is the biggest animal ?") print(question1) a=("rat") print("a -",a) b=("whale") print("b - ",b) c=("elephant") print("c - ",c) d=("dog") print("d - ",d) answer=str(input("Enter your answer : ")) correct_option=("b") if (answer==correct_option) : print("Correct answer") print("you won 5000 rs") else: print("wrong answer") print("You may go home now")
@otherself-tb9st7 ай бұрын
@cruelfarter9976 Remarks : This process is simpler for one question, but now try to implement it form 20 question at that time you would have to write these 18 lines 20 times which would decrease the readability to debug the problem. And if there is only one question than why store the question and option in variable you could simply write it in print statement that would be much easier.
@codyandersan Жыл бұрын
Harry Bhai has already made Exercise 4 question public on Replit!!
@soumyakashyap1450 Жыл бұрын
how to see
@ishaa-v4z8 ай бұрын
My simple code 😅 questions = ["Q1: Capital of India? A.New Delhi B.Chennai C.Mumbai D.Jaipur","Q2: National flower? A.Rose B.Lotus C.Lily D.Marigold","Q3: Father of nation? A.Narendra Modi B.Subash Chandra Bose C.Mahatma Gandhi D.Jawaharlal Nehru"] answers = ["A","B","C"] levels = [1000,2000,3000] money = 0 for i in range(3): print(questions[i]) ans = input("Enter the option of your answer:").upper() if ans == answers[i]: money = money + levels[i] print("You win Rs.", levels[i]) else: print("You lose") break print("Congratulations! You win Rs.", money)
@Tanay_Tibrewal Жыл бұрын
Harry bhai hum log crorepati nahi CODEPATI bane ge
@noobcraft5712 Жыл бұрын
I GOT SHOUTOUT NO WAYYY I USED FOR LOOP AND STRING TOO I AM SO HAPPY!!!!!!!
@astheticgamer15625 ай бұрын
Here's my code though it's a bit lengthy hope a beginner can understand it perfectly def Quiz(): questions = ["1-What is the Capital of Switzerland?", "2-On which date the first nuclear attack happened?", "3-What is a group of crows called", "4-Who wrote 'Romeo and Juliet'?", "5-Which is the largest lake in the world?", "6-Who wrote the novel “War and Peace”", "7-In what year was the first international modern Olympiad held?", "8-Entomology is the science that studies:", "9-Who wrote Vande Mataram?", "10-Where is the battlefield of Plessey situated?"] options = ["A = Adliswil B = Solothurn C = Bern D = Zurich", "A = January 30, 1945 B = September 1, 1945 C = August 9, 1944 D = August 6 1945", "A = SAWT B = murder C = clowder D = flock", "A = William Shakespeare B = JK Rowling C = John Milton D = George Eliot", "A = Caspian Sea B = Lake Victoria C = Great Bear Lake D = Lake Huron", "A = Anton Chekhov B = Vladimir Nabokov C = Ruskin Bond D = Leo Tolstoy", "A = 1898 B = 1896 C = 1888 D = 1884", "A = Animals B = Sloth C = Birds D = insects", "A = RabindraNath Tagore B = Bankeem Chandra Chaterji C = Jawaharlal Nehru D = Zakeer Hussain", "A = Takshashila B = West Bengal C = Delhi D = Odissa",] print(questions[0]) print(options[0]) Ans0 = input("Enter your option as: A/B/C/D: ") if(Ans0 == "C" or Ans0 == "c"): #here you can't write if(Ans0 == "C" or "c") it will not give the output correctly print("Congratulations that's correct you have won", 10000000/(2**9), "rupees Let's move to the next question") print(questions[1]) print(options[1]) Ans1 = input("Enter your option as: A/B/C/D: ") if(Ans1 == "D" or Ans1 == "d"): print("Congratulations that's correct you have won", 10000000/(2**8), "rupees Let's move to the next question") print(questions[2]) print(options[2]) Ans2 = input("Enter your option as: A/B/C/D: ") if(Ans2 == "B" or Ans2 == "b"): print("Congratulations that's correct you have won", 10000000/(2**7), "rupees Let's move to the next question") print(questions[3]) print(options[3]) Ans3 = input("Enter your option as: A/B/C/D: ") if(Ans3 == "A" or Ans3 == "a"): print("Congratulations that's correct you have won", 10000000/(2**6), "rupees Let's move to the next question") print(questions[4]) print(options[4]) Ans4 = input("Enter your option as: A/B/C/D: ") if(Ans4 == "A" or Ans4 == "a"): print("Congratulations that's correct you have won", 10000000/(2**5), "rupees Let's move to the next question") print(questions[5]) print(options[5]) Ans5 = input("Enter your option as: A/B/C/D: ") if(Ans5 == "D" or Ans5 == "d"): print("Congratulations that's correct you have won", 10000000/(2**4), "rupees Let's move to the next question") print(questions[6]) print(options[6]) Ans6 = input("Enter your option as: A/B/C/D: ") if(Ans6 == "B" or Ans6 == "b"): print("Congratulations that's correct you have won", 10000000/(2**3), "rupees Let's move to the next question") print(questions[7]) print(options[7]) Ans7 = input("Enter your option as: A/B/C/D: ") if(Ans7 == "D" or Ans7 == "d"): print("Congratulations that's correct you have won", 10000000/(2**2), "rupees Let's move to the next question") print(questions[8]) print(options[8]) Ans8 = input("Enter your option as: A/B/C/D: ") if(Ans8 == "B" or Ans0 == "b"): print("Congratulations that's correct you have won", 10000000/(2**1), "rupees Let's move to the next question") print(questions[9]) print(options[9]) Ans9 = input("Enter your option as: A/B/C/D: ") if(Ans9 == "B" or Ans0 == "b"): print("Congratulations that's correct you have won", 10000000/(2**0), "You are now a Crorepati") else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**2)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**3)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**4)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**5)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**6)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**7)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**8)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**9)) else: print("Sorry you lost the game here and you have won an amount of", 10000000/(2**10)) else: print("Sorry You Lost The Game") A = input("Please enter your good name: ") print("'Greetings'", A, "Welcome to Kaun Banega Crorepati") B = input("If you want information about how to play type 1 or type 2 to begin! ") if (B == "1"): print("There will be 10 questions in the game if you answer all the questions correctly you will win 1 crore rupees in the end. If you give an incorrect answer then you will loose the game. You don't have timelimit for any question. If you give wrong Answer you will get half the amount you have won !'Best Of Luck'!") C = input("As you now know how to play please press 2 to begin the game ") if(C == "2"): print("Let's Begin") Quiz() else: print("refresh the page and then start game directly by pressing 2 instead of 1") elif (B == "2"): print("Let's Begin the game!") Quiz() else: print("Please Refresh the page") Like the comment if you understand the code easily!!!😃😄😄😀
@@AyushSahu-v3f kya kru bhaiia strt me to itna hi josh rehta hai 🤪🤪🤪
@astheticgamer15623 ай бұрын
@@AyushSahu-v3f btw abhi strt kiya ho python sikhna to complete jarur krna bahut badiya hai 😀😃
@AyushSahu-v3f3 ай бұрын
@@astheticgamer1562 ha bhai abhi kon sa year h
@RishabhKumar009411 ай бұрын
here I much more confident in loops.
@sidharthasenapati4126 Жыл бұрын
questions = { 1: {'question': 'Which planet is closest to the sun?', 'options': ('Mercury', 'Venus', 'Earth', 'Mars'), 'answer': 'Mercury'}, 2: {'question': 'Which is the largest ocean in the world?', 'options': ('Atlantic', 'Pacific', 'Indian', 'Arctic'), 'answer': 'Pacific'}, 3: {'question': 'Who invented the telephone?', 'options': ('Thomas Edison', 'Alexander Graham Bell', 'Benjamin Franklin', 'Nikola Tesla'), 'answer': 'Alexander Graham Bell'}, 4: {'question': 'Which is the highest mountain peak in the world?', 'options': ('Mount Everest', 'K2', 'Kangchenjunga', 'Lhotse'), 'answer': 'Mount Everest'}, 5: {'question': 'Who is the father of Computer Science?', 'options': ('Charles Babbage', 'Alan Turing', 'Grace Hopper', 'John von Neumann'), 'answer': 'John von Neumann'} } def ask_question(question_number): question = questions[question_number]['question'] options = questions[question_number]['options'] for i in range(len(options)): print(f'{i+1}. {options[i]}') answer = input("Enter the number of your answer: ") if options[int(answer)-1] == questions[question_number]['answer']: print("Correct!") return True else: print("Incorrect.") return False def play_game(): prize_money = 0 for question_number in range(1, 6): correct = ask_question(question_number) if correct: prize_money += (question_number * 1000) else: print(f"You won a total of {prize_money}") break print(f"Congratulations! You've won {prize_money}") play_game()
@aniketmitra83278 ай бұрын
MV GK AND CS COMPUTER SCIENCE
@vivekkumawat732410 ай бұрын
i knew this bro but i didnt know that how to make the quiz of different questions and how to manage their options
@hassamamjad-x8l Жыл бұрын
and harry bahi I learn every computer language from your video
@jatinbhatt2222 Жыл бұрын
Present Sir on Day-39 ✋
@SparkleFunTV19 күн бұрын
14:15 Harry Bhai Question to terminal me nazar hi nahi aa rahe hai lekin koi bat nhi me ne is ka hal dhond lya hai: _______________________________________________________________________________________________________________________________________________________________________________________________ print("Welcome to KBC!") questions = [ ["1. Which Programming Language was used to create Facebook?", "Python", "HTML", "JavaScript", "PHP", "C++", 4], ["2. When is Windows 10 end of support by Microsoft?", "2026-Nov", "2055-Jun", "2025-Oct", "2034-May", "2024-Dec", 3], ["3. Which one is not a web browser?", "Chrome", "Linux", "Safari", "Firefox", "Edge", 2], ["4. What is HTTP used for?", "Email", "Gaming", "Coding", "Browsing", "Calling", 4], ["5. Which is a social media platform?", "Facebook", "Python", "ChatGPT", "Excel", "Capcut", 1], ["6. Which company owns KZbin?", "Meta", "Apple", "Google", "Microsoft", "Amazon", 3], ["7. What does VPN protect?", "Ads", "Privacy", "Speed", "Viruses", "User", 2], ["8. Which is a search engine?", "Bing", "WhatsApp", "Photoshop", "Discord", "Copilot", 1], ["9. What does a Firewall do?", "Boost Speed", "Delete Files", "Block Access", "Open Sites", "Burn Data", 3], ["10. What is 'www' short for?", "World Wide Web", "Web World Wibe", "Wonder Wide Web", "World Wide Well", "Wonderful World's Web", 1], ["11. Which Keyboard Key is used to Refresh?", "Ctrl", "R", "Esc", "F5", "/", 4], ["12. Which device connects to Wi-Fi?", "CPU", "Router", "Printer", "DVD", "TV", 2], ["13. What is 'Google' known as?", "Search Engine", "Social Media", "Operating System", "Chatbot", "Photo Editor", 1], ["14. Which is a File type for Images?", "PDF", "TXT", "JPG", "MP4", "EXE", 3], ["15. What is 'Ctrl + X' used for?", "Copy", "Cut", "Paste", "Undo", "Redo", 2], ["16. What is KZbin used for?", "Video Sharing", "Search Engine", "Code Editor", "Video Editor", 1], ] levels = [1000, 2000, 3000, 5000, 10000, 20000, 40000, 80000, 160000, 320000, 1250000, 2500000, 5000000, 7500000, 10000000, 75000000] money = 0 for i in range(0, len(questions)): question = questions[i] print("") print(question[0]) print(f"Question for Rs. {levels[i]}") print(f"1. {question[1]} 2. {question[2]}") print(f"3. {question[3]} 4. {question[4]}") reply = int(input("Enter your Answer 1-4: ")) if reply == question[-1]: print(f"Correct Answer! You won Rs. {levels[i]}") if(i == 4): money = 10000 elif(i == 9): money = 320000 elif(i == 14): money = 7500000 elif(i == 16): money = 75000000 else: print(f"Wrong Answer!") break print(f"The money you are taking home is Rs.{money}!") _______________________________________________________________________________________________________________________________________________________________________________________________ Answers: 1 wale ka 4 option correct hai, 2 wale ka 3 option correct hai, 3 wale ka 2 option correct hai, 4 wale ka 4 option correct hai, 5 wale ka 1 option correct hai, 6 wale ka 3 option correct hai, 7 wale ka 2 option correct hai, 8 wale ka 1 option correct hai, 9 wale ka 3 option correct hai, 10 wale ka 1 option correct hai, 11 wale ka 4 option correct hai, 12 wale ka 2 option correct hai, 13 wale ka 1 option correct hai, 14 wale ka 3 option correct hai, 15 wale ka 2 option correct hai, 16 wale ka 1 option correct hai. 😊
@tayyabukhari2 ай бұрын
Harry Bhai you taught f-string after the quiz but you develop your whole program using f-string. But, in last quiz you told us to solve quiz to your previous knowledge which you taught us. BTW, Thank You.
@Uploader12 Жыл бұрын
start of video 😋😋😋😋
@irfanmohammad2132 Жыл бұрын
21:18 #harrybhai using our Desi language 😂
@factobizz4 ай бұрын
2:54
@AbdulRehman-jo5pu Жыл бұрын
harry bhae k phly wali vidoe dekho aur ab wali harry bhae young ho rhy hain.... instead of being older.
@otherself-tb9st7 ай бұрын
@AbdulRehman-jo5pu. You too found that.
@raheelniazi5337 Жыл бұрын
can any one explain me why if statement written like this if (reply==question[-1]):, as correct option was 4 it could be like this if (reply==question[4]):,
@otherself-tb9st7 ай бұрын
@raheelniazi5337 You probably would have got the answer, but a lot of people are asking this same question so here is the answer. question variable contains the list of first question, it's option and the answer(see line 104, he accessed the question at the particular index given from *i*). Now the answer in the this list is stored at the last index which could be accessed as *question[len(question)-1]*(you could manually write the index here as the place is same in every list) or *question[-1]*(see negative indexing chapter if you forgot it). The question @raheelniazi5337 places is maybe the confusion that the correct answer is at the index 4 so why can't reply be checked with that, it is because reply from user is in the form of integer and the question[4] is equal to 'php' which will not result True. Or maybe the doubt is that why can't we have the option 4 itself written which will not work as question[4] gets the item at the index 4, it does not means the option 4 of the question.
@otherself-tb9st7 ай бұрын
The question list defined in harry repel is a nested list. store = [ ['red', 'yellow'], ['mango', 'banana'] ] Nested list contains list within list. store is also nested list. If we write, print(store[0]) The output will be, ['red', 'yellow'] As the first element is the inner list. But if we want to get yellow we will write, print(store[0][1]) This will firstly ask for the list at the index 0 and then the element within the list at index 1. A more readable way would be to use variable, first_list = store[0] print(first_list[1]) This is what is being done in the harry code. He first of all takes the value at the index given in the loop variable *i* and grabs the element from the list questions and stores it in question variable. Now he could easily access the question, answer, and option. One interesting thing to try. Run this program, new = ['string', 'data'] print(new[0][3]) What is the reason behind this?
@ZafarIqbal-dc7qh3 ай бұрын
Amazing intro.
@02.atulya-chenab-abharani867 ай бұрын
ans_of_user = input().upper() no disrespect but we could do the entire KBC by just using def functions like this def quest_ans(questno=1,quest = "your question", options = "your options", correct_ans = "whichever is the correct ans to the question", price = 1000*1, user_ans = ans_of_user): print("here is the question no", questno, "for ₹", price,":") print(quest) print(options) if user_ans == correct_ans: print("Congrats on winning", cost) return (True) else: cost = cost-1000 print("Wrong answer Sorry you are out but congrats on winning", cost) for the logic of 2nd question if 1st question solved: if quest_ans == True: quest_ans(the same format but different key value pairs for your question) #u can say the user to print only the alphabet so it will be not that complex
@rutu_975 ай бұрын
Question bhi o/p mai dikhana chahiye na Harry bro Program ko edit krna padega
@JoyBoy_013 Жыл бұрын
#100 Days of python course
@jodathassan88944 ай бұрын
list=["For Rs.1000: Which language has the more native speakers?","A. English\tB. Spanish C. Chinese\tD. German Enter correct option or quit to quit: ","c",1000," For Rs.5000: What is the most common surname in the United States?","A. Brown\tB. Smith C. Tucker\tD. Wilson Enter correct option or quit to quit: ","b",5000," For Rs.10000 How many elements are in the periodic table?","A. 116\tB. 117 C. 118\tD. 119 Enter correct option or quit to quit: ","c",10000] total=0 flag=False for i in range(0,len(list),4): answer=input(list[i]+" "+list[i+1]) if answer.lower()=="quit": print(" You have quit the game") break if answer.lower()==list[i+2]: total+=list[i+3] print(f" Correct Answer You won {list[i+3]}") else: print(" Wrong Answer") flag=True break if flag==True or total==0: print("You won nothing :( ") else: print("Your prize is",str(total)+"! Congratulations :) ")
@pianosmartie3018 Жыл бұрын
Hi ....my son 9 yr old garvit pareek big fan and answer yr each excercise..... Always wait to take his name.......he learn so much from your video.....thank you
@mdghalibhussain5 ай бұрын
Cheat code:- if you quit on first question only then the code will show you the output, congratulations you have won 10000000
@sbndBhanu546Ай бұрын
Check the Solution 👇👇👇 #actually for different options of lifeline i am changing questions print("Welcome to 'Kaun Banega Crorepati' (KCB) 😊") name=input("Enter your name: ") print("Rules 1)Lifeline Options: (i)eliminates two incorrect options(ET). \t (ii)calls a preselected friend for help(call). \t (iii)polls the studio audience(poll). \t (iv)changes the current question.") print("2)Progressive Prize Levels: The game consists of a series of multiple-choice questions with increasing difficulty.") print("3)Elimination on Wrong Answer: If a contestant answers a question incorrectly, they are eliminated from the game and leave with the prize amount ") print("So Lets begin!") q1=["Which planet is known as the 'Red Planet'?","A. Venus","B. Mars","C. Jupiter","D. Saturn","B"] q2=["Who is the author of the Harry Potter series?","A. J.R.R. Tolkien","B. J.K. Rowling","C. George R.R. Martin","D. Stephen King","B"] q3=["What is the capital of Australia?", 'A. Sydney','B. Melbourne','C. Canberr','D. Perth','C'] q4=["Which of the following is the longest river in the world?",'A. Amazon','B. Nile','C. Yangtze','D. Mississippi','B'] q5=["Who is known as the 'Father of the Indian Constitution'?",'A. Mahatma Gandhi',' B. B.R. Ambedkar','C. Jawaharlal Nehru','D. Sardar Vallabhbhai Patel','B'] q6=["Which chemical element has the symbol 'O'?",'A. Oxygen','B. Gold','C. Osmium','D. Opal','A'] q7=["Which planet is known as the 'Red Planet'?","A. Venus","B. Mars","C. Jupiter","D. Saturn","B"] q8=["Who is the author of the Harry Potter series?","A. J.R.R. Tolkien","B. J.K. Rowling","C. George R.R. Martin","D. Stephen King","B"] q9=["What is the capital of Australia?", 'A. Sydney','B. Melbourne','C. Canberr','D. Perth','C'] q10=["Which of the following is the longest river in the world?",'A. Amazon','B. Nile','C. Yangtze','D. Mississippi','B'] # b1=["Which planet is known as the 'Red Planet'?","A. Venus","B. Mars","C. Jupiter","D. Saturn","B"] # b2=["Who is the author of the Harry Potter series?","A. J.R.R. Tolkien","B. J.K. Rowling","C. George R.R. Martin","D. Stephen King","B"] # b3=["What is the capital of Australia?", 'A. Sydney','B. Melbourne','C. Canberr','D. Perth','C'] q=[q1,q2,q3,q4,q5,q6,q7,q8,q9,q10] # bonus=[b1,b2,b3] sum=0 # j=1 # def changeQ(i,j): # print(i + 1, ')', bonus[j][0]) # print(bonus[j][1]) # print(bonus[j][2]) # print(bonus[j][3]) # print(bonus[j][4]) # option = input("Enter option: ") # return option for i in range(10): print(i+1,')',q[i][0]) print(q[i][1]) print(q[i][2]) print(q[i][3]) print(q[i][4]) option=input("Enter option: ") # if((option == ("eliminate two") or ("call a friend") or ("conduct a poll"))and ) if(option==(q[i][5])): sum=sum+(i+1)*10000 if(i == 9): print(f"Wow you have answered all the questions Congratulations {name} Your final prize money is: ",sum) else: print("Now your prize money is: ",sum) else: print(f"Sorry {name} your option is incorrect, your final prize money is: ",sum) break please support: www.youtube.com/@sbndBhanu546
@PoonamSharma-hx9jx Жыл бұрын
Sir please create a playlist on hacking with python
@Radhe_radhe2929 Жыл бұрын
Day 39 🔥
@shrutigupta8166 Жыл бұрын
Aapko mimicry v aati h .Waao😍
@kpubhiya832911 ай бұрын
#harry bhai you are great , harry bhai this problem i am already solve without seeing your answer using only list, and if else statement , but today i am realise that main abhi bacha hun..
@deepakjoshi5476 Жыл бұрын
your face expression is like ohh 😃😃 siri ko kya ho gya
@Vignesh-y4j4 ай бұрын
39th one!!
@victorb226227 ай бұрын
10:40 यहां switch case अच्छा रहता क्यू की money की वैल्यू fix है जैसे 10000, 3,20,00, 1,00,00,000
@anwesaghosh229110 ай бұрын
qs = [ ['How does Gregor (“the Mountain”) Clegane kill Oberyn Martell, the “Red Viper,” in their trial by combat?', "crushes his skull", "strangles him", "poisons him", "cut's his head off"], ['What are the “house words” of House Greyjoy?', "Winter is coming", "Ours is The fury", "Unbowed, Unbent, Unbroken", "we don't sow"], ["Who is Jon Snow’s mother?", "Lysa Arryn", "Cersei Lannister", "an unnamed prostitute", "Lyanna Stark"], ['Which former ranger of the Night’s Watch led an army of wildlings as the “King-Beyond-the-Wall”?',"Tormund Giantsbane","Janos Slynt","Craster","Mance Rayder"], ['What is Davos Seaworth’s nickname?',"the Onion Knight","the Sand Snake","the Sand Snake","the Hound"], ] correct_answers = [1, 4, 4, 3, 1] for i in range(len(qs)): print(qs[i][0]) print(f'a.{qs[i][1]} b.{qs[i][2]}') print(f'c.{qs[i][3]} d.{qs[i][4]}') ans = input(" Enter the correct answer (a/b/c/d): ").lower() if ans == ['a', 'b', 'c', 'd'][correct_answers[i]-1]: print("CORRECT ANSWER") else: print("WRONG ANSWER") CAN SOMEONE EXPLAIN ME THE LINE if ans == ['a', 'b', 'c', 'd'][correct_answers[i]-1]:???
@Shortsfortheday217 ай бұрын
yes sur ethe reason why he has correct_answer[i]-1 is because he creates a list with all the question, andswers and teh options in one list and sets the i-1 the last element of the list as teh answer hence that
@81raviranjan67 Жыл бұрын
Super se v upr brother 🥳🥳
@KastilIslam Жыл бұрын
After addressing it, Erdogan sat in his seat again. He had a smile that was filled with so much pride. It made me feel that with this much power he will claim to be the Mahdi but Allah Knows Best. Then I saw big people of evil forces become angry when they saw this. They said that this man is very dangerous, after getting this much power he will be able to do anything and his plans are dangerous as well. And if he wants to be like the Ottoman Empire then he will be even more dangerous". 🌟Please find more of these important dreams of Muhammad Qasim. We are the last generation in this world.
@rahuldeora8406 ай бұрын
amazing course
@maryamshakil78826 ай бұрын
Seriously, you gave this exercise on day 27 and now u used some things whuch we hadn't done back then in thus repel, like f string and more.
@uditbaliyan99252 ай бұрын
we already done with the f string brother.
@goodbeing-op9tx Жыл бұрын
Main new hn puthon main so, mujhy thora ziada samjhana chahye tha . Afterall yh video freshers k liye bhi tu hai .
@Hellohuman0 Жыл бұрын
SUPERB VIDEO 😍❤️
@arpanadhikari6881 Жыл бұрын
I found a mistake in your program harry bhai.. If we dont know the first question and decide to quit, we win 1 crore rupeess.. as you have used money=levels[i-1], in the first step level becomes -1 so it gives 1crore rupees if you quit in the very first step
@swastikatharva47634 ай бұрын
yeah
@anshuman.tiwari Жыл бұрын
Harry bhai sab kuchh to theek tha per shayad aap question print krwana bhool gye
@Primehunter0018 ай бұрын
Hahahaj sirii na ap ko kasa chop kr diyaa 😂😂 soo funny
@be_my_viewer7 ай бұрын
Understandable python series and fun part is Siri interaction 😂...
@elitrefy_op7 ай бұрын
Question = ['Who wrote the Indian national anthem, "Jana Gana Mana"?', 'Which Indian city is known as the "Silicon Valley of India"?', "What is the official language of the Indian state of Maharashtra?", 'Which Indian state is known for its tea plantations and is often referred to as the "Scotland of the East"?', "Who was the first woman to serve as the Prime Minister of India?", "Which Indian city is famous for its annual Kumbh Mela festival?", "What is the name of the largest mountain range in India?","Which Indian state is famous for its backwaters?", 'Which Indian city is known as the "Pink City"?', "What does CPU stand for?", "What is the function of RAM in a computer?", "What is the chemical symbol for the element gold?", "What is the largest organ in the human body?", 'Which planet is known as the "Red Planet"?', "Who was the first person to step on the moon?"] Options = ["A) Rabindranath Tagore B) Mahatma Gandhi C) Jawaharlal Nehru D) Subhas Chandra Bose", "A) Mumbai B) Chennai C) Hyderabad D) Bengaluru", "A) Hindi B) Marathi C) Tamil D) Telugu", "A) Assam B) Meghalaya C) Sikkim D) Mizoram", "A) Sonia Gandhi B) Indira Gandhi C) Pratibha Patil D) Mamata Banerjee", "A) Varanasi B) Haridwar C) Allahabad D) Nashik", "A) Himalayas B) Western Ghats C) Eastern Ghats D) Aravalli Range", "A) Kerala B) Goa C) Tamil Nadu D) Karnataka", "A) Jaipur B) Jodhpur C) Udaipur D) Agra", "A) Central Processing Unit B) Computer Performance Unit C) Core Processing Unit D) Central Performance Utility","A) Long-term storage B) Temporary storage C) Processing data D) Displaying graphics", "A) Au B) Ag C) Fe D) Cu", "A) Liver B) Heart C) Skin D) Brain", "A) Venus B) Mars C) Jupiter D) Saturn", "A) Buzz Aldrin B) Neil Armstrong C) Yuri Gagarin D) Alan Shepard"] Answers = ["A", "D", "B", "B", "B", "C", "A", "A", "A", "A", "B", "A", "C", "B", "B"] scores = [0, 100, 200, 500, 1000, 2000, 5000, 10000] print("NAMASKAR DEVIYO AUR SAJJANO! MAI PYTHON PROGRAM AAP SABHI KA SWAGAT KARTA HU ISS ADBHUT KHEL MEIN JISKA NAM H KAUN BANEGA HAJAR-PATI ") import random for i in range(0,len(Question)): randomQ = random.randint(0, len(Question)-1) random_element = Question[randomQ] random_element2 = Options[randomQ] random_element3 = Answers[randomQ] print(random_element) del Answers[Question.index(random_element)] del Question[Question.index(random_element)] print(random_element2) del Options[Options.index(random_element2)] S = input("Enter option A, B, C or D ") if random_element3 == S.upper(): print("Your Answer was correct. Your current score is:", scores[i+1]," ") if i == 6: print("CONGRATULATIONS! YOU WIN! ") break scores = [0, 100, 200, 500, 1000, 2000, 5000, 10000] exit() else: print("Your Answer was Incorrect. Your total is:", scores[i]) print("YOU LOSE! ") break scores = [0, 100, 200, 500, 1000, 2000, 5000, 10000] exit() (I made 4 different lists and also imported a random module to make my program more fun to use even on repetition)
@shauryasaxena2406 Жыл бұрын
thanks sir
@shauryasaxena2406 Жыл бұрын
thanks sir
@LizzieSpot Жыл бұрын
bhai plzz make a video on KOTLIN FULL COURSE plzz plzz plzzzzzzzz
@rupagupta478013 күн бұрын
if(reply ==question[-1]: me question[-1] hi kyu hai
@im-Anarchy Жыл бұрын
im 16 and learning programming for about 3 years now i have learned C,C++, Java, web development(basic) and finally i have found my passion that is ML and AI, my brother is 10 and i ask him many times not to waste his time ,rather he can learn skills or learn to use AI tools for various purposes but he is too small to understand value of time. I am saying this because i am also going through a hard time i want to pursue tech i have clear goals afterall i have to eat the shit of our fuckin indian education system i have boards in 2 months , and then iit prep. wasting 2 years in eating the shit of useless physics ,chemistry and maths because my parents are of old mindset. So I will only say to utilise your time as much as possible, and remember if you wish to go in service sector ,competition and tech is growing exponentially, and AI will always be there to automate your job in most cases, and so always keep yourself and your skills up to date and above AI, and learn how to use AI for your upskilling and betterment.
@vyasrudra Жыл бұрын
wait till you see the reality, i was the same as you, EXACT SIMILAR SITUATION AS YOURS!! but now i understand the society much better.
@im-Anarchy Жыл бұрын
@@vyasrudra what's your age
@vyasrudra Жыл бұрын
@@im-Anarchy 18
@im-Anarchy Жыл бұрын
@@vyasrudra did you also wasted your time on college preparation or utilised your time on skills and learning
@vyasrudra Жыл бұрын
@@im-Anarchy wasted, and i have a little brother too :)
@heymaadurga352 Жыл бұрын
Kya bat hai sir
@mr_roshann__92 Жыл бұрын
Question is not showing use this - print(f"({i+1}) {question[0]} ") print(f"a. {question [1]} \t b. {question [2]}") print(f"c. {question [3]} \t d. {question [4]}")
@hp.jamadar6 ай бұрын
great work siir
@vaibhavsoni4680 Жыл бұрын
quesiton=['What is the capital of Australia?','Name the longest river in the world ?','In which continent is the Sahara Desert located?','In which year did World War II end?'] a=input("do you want to play kbc press yes") while(a=='yes'): print(quesiton[0]) print('1)Victoria ,2) Queensland 3) Tasmania 4) Canberra') b=int(input("press 1,2,3 or 4 for answer")) if b==4: print("congratualtion you win 1000 rs") print(quesiton[1]) print('1) Amazon River 2) Nile River 3) Yangtze River 4) Danube River') c=int(input("press 1,2,3 or 4 for answer")) if c==2: print("congratualtion you win 5000 rs") print(quesiton[2]) print('1) continent of africa 2) Western Africa 3) Timbuktu 4) Great Pyramids of Giza') d=int(input("press 1,2,3 or 4 for answer")) if d==1: print("congratualtion you win 10,000 rs") print(quesiton[3]) print('1)1942, 2)1943 3) 1945 4) 1946') e=int(input("press 1,2,3 or 4 for answer")) if e==3: print("congratualtion you win 10000000 rs") break else: print('sorry wrong answer thanku for playing ') a=input("do you want more play press yes and no for exit") else: print('sorry wrong answer') a=input("do you want more play press yes and no for exit") else: print('sorry wrong answer') a=input("do you want more play press yes and no for exit") else: print("sorry wrong answer") a=input("do you want more play press yes and no for exit")