No video

Create Quiz Using Dictionary | Python Tutorials | Interview Question

  Рет қаралды 40,241

Amulya's Academy

4 жыл бұрын

In this Python programming video tutorial you will learn how to create multi choice quiz using dictionaries in detail.
Here we will take question and its options as key and correct option to that question as value and we will iterate through the dictionary to print the question.
#Python #PythonProgramming
For more free tutorials on computer programming
AmulsAcademy
AmulsAcademy

Пікірлер: 116
@abhishekpathak9454
@abhishekpathak9454 4 жыл бұрын
Jor se crush ho gya mko is video pr💝🤩 Explanation is too much well.. Tq uhh🤗
@mujeebabbu
@mujeebabbu 4 жыл бұрын
Excellent explanation and soothing voice. Just subscribed you, you are awesome!
@francismannion7075
@francismannion7075 17 күн бұрын
Thank you for a very informative and well explained lesson.
@hadim
@hadim 4 жыл бұрын
Thank you very much for your videos. Do you have any plan to put them on Github?
@nunoseitan6173
@nunoseitan6173 3 жыл бұрын
Thanks allot ! Great explained. If you want to validate your input how'd will do it. For instance in the case that the answer is out of that 4 letter or if you put something else on quit programm then y/n? Thanks allot again
@nitinnamdev5627
@nitinnamdev5627 4 жыл бұрын
Thanks you soo much i think this is a only one channel to give this type of explanation
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
It's my pleasure :)
@Sandeepindiamyself
@Sandeepindiamyself 4 жыл бұрын
I completely understand every step in this program and how can set a timer in this program.
@siriraghavendra5577
@siriraghavendra5577 4 жыл бұрын
thanks a lot maam! made my foundation concepts even stronger!
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Glad to hear that!
@ammarahmed3562
@ammarahmed3562 4 жыл бұрын
Excellent Work Amul Looking Forward to get more Programming Knowledge from you!!
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@Mendadel
@Mendadel 4 жыл бұрын
hey amuliya, can u please share ur future or previous sample file so we can also download and edit it. BTW kudos for ur efforts..
@PRADEEP_SUNKARI
@PRADEEP_SUNKARI 4 жыл бұрын
Your explanation is very clear and perfect 👌👌
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@deghinmoteialfred-ugbenbo4414
@deghinmoteialfred-ugbenbo4414 2 жыл бұрын
Thanks a lot Amulya
@KishoreKumar-zh9jf
@KishoreKumar-zh9jf 4 жыл бұрын
You are using for programming is that notepad or any IDE?
@mahirvahmad2149
@mahirvahmad2149 4 жыл бұрын
Excellent job. Keep posting this kind of programs
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@sahilchaudhary8520
@sahilchaudhary8520 2 жыл бұрын
Great explaination
@82priyanshusingh78
@82priyanshusingh78 Жыл бұрын
Great job keep it up
@urknowledge_hub
@urknowledge_hub 2 жыл бұрын
I'm feeling very grateful for your way of explanation . Why i need tell great explanation i don't why even my mother tongue is telugu even your entire class was in English i feel that I'm listing the class in my own language every detail you pronunce was clear and clear . Mem please tell me how to install the application that you are using please ping me . Thankyou:)
@mouleshm210
@mouleshm210 4 жыл бұрын
please do more of this type of interview questions video....its very useful
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Sure 👍
@shweta439
@shweta439 Жыл бұрын
❤nice explanation
@paulrhodes7337
@paulrhodes7337 8 ай бұрын
how would you do this with the questions nested
@sadhnatiwari5747
@sadhnatiwari5747 4 жыл бұрын
Nice one
@rutwickalyan8003
@rutwickalyan8003 4 жыл бұрын
Thank you. May be Repeatedly using a word (Thank you) creates Monotony, but it is the best apt word.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Pleasure :)
@lisa_786
@lisa_786 2 жыл бұрын
How would you do this by including a dictionary file into it
@yellurisiva3005
@yellurisiva3005 4 жыл бұрын
hi,madam what is the use of this quiz its will be use full in real time program .if its use organizations how they will do please answer me? give me one example
@SABARINATHAN-hm2oz
@SABARINATHAN-hm2oz 3 жыл бұрын
After watching video , I'm subscribed your channel
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@vikastiwari10
@vikastiwari10 4 жыл бұрын
wow amulya Ur way of teaching
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@nbiyahyasharahla
@nbiyahyasharahla 7 ай бұрын
How could you give the user an option of hints for the questions?
@alexanderpersson792
@alexanderpersson792 3 жыл бұрын
Perfect! How can I add random shuffle to this code?
@viper2.081
@viper2.081 3 жыл бұрын
i added it and its hard let me explain in this comment so for i in random.choices(list(q_a)): print() print(i) this shuffles it and picks a random question
@77Sherms
@77Sherms 3 жыл бұрын
In the for loop, if i is a temporary variable to store the keys of the questions dictionary why do you use questions in the if statement to call the dictionary and how does i become the values of the dictionary when it is already being used to store the keys?
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
In the dictionary key is question and value is answer. i is temporary variable storing key. After user enters the answers we need to compare that with the value of dictionary .{because correct answer is stored in value } To access the value in dictionary we need to use key. dictionary[key] in the program questions[i] will give you the value of that key that means the correct answer for the question. Thank you :)
@77Sherms
@77Sherms 3 жыл бұрын
@@AmulsAcademy Thankyou.
@Wow-oz4ym
@Wow-oz4ym 3 жыл бұрын
This's such an interesting tutorial..! How I wish it can be done with a background using Turtle module!!! Anyway, I'm trying to do it but being a novice it's just throwing me up.
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :) All the best :)
@satyapalsingh6418
@satyapalsingh6418 3 жыл бұрын
This video is so helpful to me
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Glad to hear that 😊
@krib1669
@krib1669 4 жыл бұрын
Isn't 'eval' a built-in function in python and hence a keyword?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
eval is not a keyword, it is a built_in function. You can check like this. import keyword keyword.iskeyword("eval") it will give False. :)
@ranjeetamodi7168
@ranjeetamodi7168 2 жыл бұрын
Heyy... Thnk uh so much for this video. But actually I wanted to ask you.. Can you please tell what all topics you have included here?
@siiikebro1883
@siiikebro1883 2 жыл бұрын
Hogya viva ka tayyari?
@siiikebro1883
@siiikebro1883 2 жыл бұрын
For loop If-else Break Continue
@anshikaverma6553
@anshikaverma6553 2 жыл бұрын
What if we have total 20 questions and we have to display only 5 of them randomly then what we'll do??
@aashishraina2831
@aashishraina2831 3 жыл бұрын
excellent problem to practice. Can we have more of such problems. PLZ PLZ.............
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Sure :)
@payalatre8491
@payalatre8491 4 жыл бұрын
Very nice...👌👌
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thanks a lot 😊
@stay_focus04
@stay_focus04 3 жыл бұрын
Thnkuuu soo much mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure 😊
@venkatkrishnan9777
@venkatkrishnan9777 2 жыл бұрын
Super
@superintendentficw1603
@superintendentficw1603 3 жыл бұрын
Wonderfulllllllll......
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you so much 😀
@Dynamic-rn6wc
@Dynamic-rn6wc 4 жыл бұрын
Excellent
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@himabindugandikota4526
@himabindugandikota4526 4 жыл бұрын
how can we add timer to this program after the time is up we can skip the question automatically
@viper2.081
@viper2.081 3 жыл бұрын
nice ideaima try to answer that in the comment below
@viper2.081
@viper2.081 3 жыл бұрын
import time now = time.time() # code print(f'It took you {round(time.time()-now)} seconds to complete the quiz.')
@fabiof.deaquino4731
@fabiof.deaquino4731 4 жыл бұрын
Sweet! 😉
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@robishankardenre3269
@robishankardenre3269 4 жыл бұрын
amazing Have been very nice , thank you 🙂🙏🇮🇳
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@77Sherms
@77Sherms 3 жыл бұрын
You have stored the questions in variables that you use as keys. Why does it print the data stored in the variables instead of the keys themselves or the value of the keys? I.e. Why doesn't it just print Q1 or the value of Q1? I don't understand how this works. Thanks.
@77Sherms
@77Sherms 3 жыл бұрын
I now understand that the variable name is being used as the key which means that value in the variable is actually the key. So when you call the variable name, that's being used as a key in the dictionary, it will actually print the value stored in the variable.
@sujangajananachari2814
@sujangajananachari2814 2 жыл бұрын
i followed your instruction but i'm getting error. for everything it will show wrong answer and get out of the loop
@jacobmathews862
@jacobmathews862 4 жыл бұрын
Please do problems on dictionary
@arshadnehal1595
@arshadnehal1595 4 жыл бұрын
awesome
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@aqsakhan8743
@aqsakhan8743 3 жыл бұрын
Is anybody can tell me in which python window miss using??? Is it idle? Or something?
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Idle 😊
@jairaj982
@jairaj982 3 жыл бұрын
thanx
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
You're welcome! :)
@sanid7871
@sanid7871 2 жыл бұрын
I am facing invalid syntax prblm in If ans==questions[I]
@hmzakhld2503
@hmzakhld2503 4 жыл бұрын
did you join nashia scheme?
@havishg5638
@havishg5638 3 жыл бұрын
i am trying to make this better . i want to do it like if the person gets marks less than 1 then automatically he should re attempt test . can you help me
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Yes take count as variable initialise it to 0, then for every correct answer increment count and later check count if it is less than 1 condition. :)
@havishg5638
@havishg5638 3 жыл бұрын
@@AmulsAcademy ok :)
@awdheshprajapati2751
@awdheshprajapati2751 4 жыл бұрын
Good channel for python learning
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@viper2.081
@viper2.081 3 жыл бұрын
u got discord?
@itsklay4355
@itsklay4355 4 жыл бұрын
Man i have fall in love with you
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@dhineshdevaraj4276
@dhineshdevaraj4276 4 жыл бұрын
revert back to the skipped question is possible
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
In this program No. But you can try :)
@vikastiwari10
@vikastiwari10 4 жыл бұрын
please reply why flag1 variable we use
@PRADEEP_SUNKARI
@PRADEEP_SUNKARI 4 жыл бұрын
U can use any variable
@vikastiwari10
@vikastiwari10 4 жыл бұрын
@@PRADEEP_SUNKARI but sir flag is name of register in computer organization
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
I took flag1, it is a variable name, Instead of flag1 You can take any name here. :)
@MadaraUchiha-dw9jl
@MadaraUchiha-dw9jl 4 жыл бұрын
Can i use random fn here with dictionary ? , that will shuffle the question ? , pls help Ur video really helped me a lot , thanku keep doing the good work .
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Yes you can! Thank you so much :)
@mohammedalif4512
@mohammedalif4512 3 жыл бұрын
is there code wid mysql database?
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
No :)
@mohammedalif4512
@mohammedalif4512 3 жыл бұрын
@@AmulsAcademy can i get this code?
@gayathrikopperla7209
@gayathrikopperla7209 3 жыл бұрын
How to execute the program
@gayathrikopperla7209
@gayathrikopperla7209 3 жыл бұрын
At 10minute 55second
@Dynamic-rn6wc
@Dynamic-rn6wc 4 жыл бұрын
Design a python program that uses a dictionary that contains ten user names and password if the username is not in the dictionary the program should indicate that the person is not a valid user and if the password is correct then it should tell that they are now logged in--(Edureka interview question 2015)
@rizvicomputercodes3968
@rizvicomputercodes3968 3 жыл бұрын
Bro plz gui se banao na
@rupashri8115
@rupashri8115 3 жыл бұрын
I'm getting option a is not defined while I run the program
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Check variable names again :)
@rupashri8115
@rupashri8115 3 жыл бұрын
Yaa but then I changed the options a,b,c,d into integers which then executed properly but thx for ur reply. And great job.. continue🍻
@karamveersingh4386
@karamveersingh4386 3 жыл бұрын
NameError: name 'score' is not defined
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Give me the program i will check :)
@satoshinakamoto171
@satoshinakamoto171 3 жыл бұрын
"nothing but.."
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
nothing but ;)
@memabe7629
@memabe7629 3 жыл бұрын
Can I do this in anaconda?
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Yes :)
@kmadhu6098
@kmadhu6098 4 жыл бұрын
sooooodiiii waste of your time
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 81 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,9 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 104 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 81 МЛН