Skip to main content

Posts

Featured

PYTHON QUIZ PRUTOR WEEK 4 😉😉😉

                                                  WELCOME GUYS TO MY BLOG   Q:1. How do you declare a dictionary in python ? ANSWER 2.dict = {“key”:”value”} REASON   Dictionary id listed in curly brackets inside these curly brackets, key and value are declared, each key is separated from its value by a colon (:), while commas separate each element. Q:2. What will be the output of the following code:         dict = { x:x for x in range(1,2) }         print(dict) ANSWER 4.{1: 1} REASON  As the for loop runs upto one hence {1:1} will print. Q:3. In python 3.x, Which of the following statement is true for following code:         age = input (“Please enter your age”) ANSWER      4.None of the above REASON  We are asking for the age in the age = input("Please en...

Latest Posts

PYTHON QUIZ ANSWER WEEK 3 PRUTOR 😉😉

PRUTOR PYTHON QUIZ WEEK 2 😉😉