
Python Coding Contest - Level 1
Authored by Arunkumar Saravanan
Computers
University
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
x = 1
while True:
if x % 5 = = 0:
break
print(x)
x + = 1
What will be the output of this code?
error
2 1
0 3 1
None of these
Answer explanation
Syntax error, there should not be a space between + and =.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which one of the following syntaxes is the correct syntax to read from a simple text file stored in ''d:\java.txt''?
Infile = open(''d:\\java.txt'', ''r'')
Infile = open(file=''d:\\\java.txt'', ''r'')
Infile = open(''d:\java.txt'',''r'')
Infile = open.file(''d:\\java.txt'',''r'')
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
x = ['XX', 'YY']
for i in a:
i.lower()
print(a)
['xx', 'yy']
['XX', 'YY']
[XX, yy]
None of these
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
import math
abs(math.sqrt(36))
Error
-6
6
6.0
Answer explanation
This function prints the square of the value.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Study the following function:
any([5>8, 6>3, 3>1])
What will be the output of this code?
False
True
Invaid Code
None of these
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Study the following statement:
>>>"a"+"bc"
What will be the output of this statement?
a+bc
abc
a bc
a
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Study the following code:
>>>"javatpoint"[5:]
javatpoint
java
point
none of these
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Database Relationships Quiz
Quiz
•
12th Grade - University
20 questions
BFS - (Virtual) Quiz 2
Quiz
•
University
20 questions
SAD-Q1
Quiz
•
University
20 questions
โครงการเพิ่มศักยภาพโปรแกรม Microsoft Power point
Quiz
•
University
20 questions
Programming Concepts in C - Quiz-II
Quiz
•
University
20 questions
Enviro Quizizz 2021
Quiz
•
University
20 questions
Information Management - QUIZ
Quiz
•
University
20 questions
Data Science (Data Preparation & Visualitation)/Pandas Python
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade