Friday, 16 August 2019

The Joy of Computing using Python- Quiz Assignment 2

Sorry for last time wrong answer for Question 2. Just overlooked the question. Even I did the same mistake.

If you sense any wrong answer, comment below so that i can verify again and give the correct one. Knowledge improves by sharing. 
This time  100% correct answers. Thank you......

1. In Python, a variable must be declared before it is assigned a value.

 
 

2. What is the output of the following program?
     for i in range(2): 
print(i,end="") 

     for i in range(4,6): 
print(i,end="" )

 
 
 
 

3. What is the output if the following code snippet?
     a=4.5
     b=15
     print(a+b)
 
 
 
 

4. What is the output of the following program?
     i = 1
     while True: 
if i%3 == 0: 
break
print(i,end="") 
i + = 1

 
 
 
 
      Ans: d
5.   i = 2
      while True:
      if i%3 == 0:
        break
    print(i,end="")
    i += 2
 
 
 
 

6. Which of the following is correct variable name in Python?
 
 
 
 

7. What is the output of this expression in Python, 3*1**3?
 
 
 
 
      Ans: a
8.  State True or False.
     Python is a case-sensitive language.
 
 
     Ans: True
9. Which of the following is not a keyword in Python?
 
 
 
 
      Ans: add
10. What would be the value of variable y if the following set of instructions are executed?
       x=4.5
       y=int(x)
 
 
 
 

Related Posts:

  • Antennas: Assignment 8 Common data for Questions 1 to 3: A circular MSA is designed at 1.8 GHz on a substrate having εr = 2.2 and h = 0.32 cm with dual feed as shown in … Read More
  • Antennas: Assignment 6: 1. For conventional microstrip antenna design, if height of the substrate increases, its (i)  Bandwidth increases    … Read More
  • Antennas: Assignment 5: 1. Which one of the following substrates should be used to provide large gain and BW of MSA for same substrate thickness?  RT Duroid 6010 (… Read More
  • Antennas: Assignment 7:                                       &nb… Read More
  • Antennas: Assignment 4: Note: The answers we post are from the solutions we get while simplification from our subject experts. Those need not to be 100% correct every time. … Read More

24 comments:

  1. Replies
    1. Sorry cant provide answers for that. None of us registered to that course. Thank you

      Delete
  2. iot 2019 week 2 and week3 answers plese

    ReplyDelete