
Python Programming Quiz

Quiz
•
Computers
•
University
•
Hard
Abdiel Vega
Used 2+ times
FREE Resource
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type does Python assign to the value "123"?
int
float
str
bool
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following operators has the highest precedence in Python?
Logical operators
Comparison operators
Arithmetic operators
Assignment operators
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you perform type conversion from a string to an integer?
int("123")
float("123")
str(123)
int.to("123")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output? python Copy code a = [1, 2, 3] print(a[1])
1
2
3
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is used for conditional branching in Python?
switch
goto
if
while
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? python Copy code if 5 > 3: print("True") else: print("False")
"True"
"False"
None
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to open a file for writing in Python?
open("file.txt", "w")
open.write("file.txt")
file.open("w", "file.txt")
open.file("file.txt", "write")
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Java Quiz

Quiz
•
University
30 questions
Programming in Python - Unit III

Quiz
•
University
25 questions
Python Module 1

Quiz
•
University
25 questions
Understanding Input, Selection and Loops in Python

Quiz
•
7th Grade - University
26 questions
Python программалау тілі бойынша тест тапсырмалары

Quiz
•
University
25 questions
PYTHON CONTERST 3

Quiz
•
University
25 questions
PYTHON CONTEST

Quiz
•
University
30 questions
Mastering Python Basics

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade