ADITYA CODING CLUB
ADITYA COLLEGE OF ENGINEERING
Sign in to Google to save your progress. Learn more
PYTHON PROGRAMMING TEST-3
1. Test contains 10 questions
2. Each question carries 1 Mark
Name of the Student: *
Roll Number:
Type valid Roll Number
*
Section: *
1. Which one of the following is a valid Python if statement?
*
1 point
2. What will be the output of following code?
for i in range (1,10):
    print (i)
*
1 point
3. What will be the output of the following code?
str1="delhi"
c=0
for x in str1:
   if(x!="h"):
       c=c+1
   else:
       pass
print(c)
*
1 point
4.  What will be the output of the following code?
i=1
while(i<=10):
    sum=sum+i   
    i=i+1
print("Sum of first ten numbers: ",sum)
*
1 point
5. what will be the output of the following code?
str='python'
print(str[3:-1])
*
1 point
6. What will be the output of the following code?

list=['a','b','c','d','e','f']
print(list[-2])
*
1 point
7. What will be the output of the following code?

list=['a','b','c','d','e','f']
print(list[::4])
*
1 point
8. What will be the output of the following python code?

mytuple = (1, 2, 3, 4)
mytuple.append( (5, 6, 7) )
print( len(mytuple))
*
1 point
9.  Select the correct ways to get the value of model key.
car = {
  "brand": "Maruti",
  "model": "Alto",
  "year": 2021
}
*
1 point
10. Built-in debugger of python is _____________
*
1 point
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy