This document contains a 20 question quiz on programming with Python that students must answer, with questions covering topics like variables, operators, functions, conditionals, loops, and basic syntax. The quiz is for the course Programming with Python (4BCS105) and is worth a total of 20 marks. Students are given 30 minutes to complete the quiz.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
41 views3 pages
Continuous Internal Evaluation Quiz - 1
This document contains a 20 question quiz on programming with Python that students must answer, with questions covering topics like variables, operators, functions, conditionals, loops, and basic syntax. The quiz is for the course Programming with Python (4BCS105) and is worth a total of 20 marks. Students are given 30 minutes to complete the quiz.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
CONTINUOUS INTERNAL EVALUATION
Quiz– 1 SEMESTER: 1 Marks: 20 COURSE: Programming with Python(4BCS105) Total Time: 30 Min
1. What is printed by the following Python code snippet?
x=5 y=x+3 print(“y”) Ans : 2. Determine the output of the following, when we execute it in command prompt. 2==2 Ans : 3. Determine the output of the following code snippet. L=[20,30,40,50] print(L[2]) Ans : 4. Fill in the blanks. import ________ random.randint(1,6) Ans : 5. What is printed by the following Python code? for i in “University”: print(i[0]) Ans : 6. Write down the output for the following Python code. print('2' + '3') Ans : 7. What is printed by the Python code? for i in range(3): print(i) Ans : 8. What is printed by the Python code? def f1(): print('Good') def f2(): print(' Afternoon Students') f1() f2() Ans : 9. What is printed by the Python code? def f1(): print('Yes') def f2(): print('No') f1() Ans : 10. What is printed by the Python code? D={1:”all”, 2:”the”, 3:”best”} print(D[3]) Ans :
11. What is printed by the Python code?
T=(2,3,4,5,”hi”) print(T[2]) Ans : 12. Detect and correct the error in the following code snippet. i=0 while( i>=2) print(i) i=i+1 13. Which is the correct operator for power (xy ) a) + b) - c) ** d) / Ans : 13. What is printed by the Python code? x=5 y=x+3 print(y) Ans : 14. Write the output of the following code snippet. a=10 b=20 if( a>=b): print(a) print(“hello”) Ans : 15. Is a variable in Python case sensitive? a)Yes b)No c) None of them d) All of them 16. Output of the following, when we execute in command prompt. >>>A=3 >>>B=4 >>>A==B Ans : 17. Which of the following assignment operation is valid statement. a) abc=100 b) a, b, c=100 c) a = = 100 d) a b c= 100
18. Output of the following
A=20 B=30 B=A print(B) Ans : 19.Output of the following A=”CMR” B=”University” print(A+B) Ans : 20. Which of the following statement is valid. a) a=university b)a=”university c)a=”university” d) ‘a’=”university” Name Section/Batch Branch Signature