Python Input and Output Quiz

Python Input and Output Quiz

7th Grade

8 Qs

quiz-placeholder

Similar activities

Lectura, escritura e interpretación de diagramas de flujo

Lectura, escritura e interpretación de diagramas de flujo

6th Grade - University

10 Qs

تكنوسوفت للبرمجة والذكاء الاصطناعي

تكنوسوفت للبرمجة والذكاء الاصطناعي

6th - 8th Grade

10 Qs

1.3Contoh program aplikasi perkantoran: pengolah kata, angka, pr

1.3Contoh program aplikasi perkantoran: pengolah kata, angka, pr

7th Grade

10 Qs

G7. U1.3. Quản lí dữ liệu trong máy tính

G7. U1.3. Quản lí dữ liệu trong máy tính

7th Grade

13 Qs

ULHAR TIK KELAS 7

ULHAR TIK KELAS 7

7th Grade

10 Qs

KUIS BAB 3

KUIS BAB 3

7th Grade - University

10 Qs

Soal Pilihan Ganda Sistem Komputer

Soal Pilihan Ganda Sistem Komputer

7th Grade

10 Qs

Tin học 4 bài 3.

Tin học 4 bài 3.

4th Grade - University

5 Qs

Python Input and Output Quiz

Python Input and Output Quiz

Assessment

Quiz

Information Technology (IT)

7th Grade

Practice Problem

Medium

Created by

Amira Abd El-aziz

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code if the user enters "Alice"? name = input("Enter your name: ") print("Hello, " + name + "!")

Hello, name!

Hello, Alice!

Enter your name: Alice

Error

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

What is the correct way to take two numbers as input, add them, and print the sum?

a = input("Enter first number: ") b = input("Enter second number: ") print(a + b)

a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) print(a + b)

a = input("Enter first number: ") b = input("Enter second number: ") print(int(a + b))

a = input("Enter first number: ") b = input("Enter second number: ") print(int(a) + int(b))

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output if the user enters 4 and 5 for the following code? x = int(input("Enter first number: ")) y = int(input("Enter second number: ")) print("Result:", x * y)

Result: 20

Result: 9

Result: 45

Error

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the following correctly calculates the average of three numbers entered by the user?

a = int(input()) b = int(input()) c = int(input()) print(a + b + c / 3)

a = int(input()) b = int(input()) c = int(input()) print((a + b + c) / 3)

a = input() b = input() c = input() print((a + b + c) / 3)

a = input() b = input() c = input() print(a + b + c / 3)

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What will be the output if the user enters 10, 2, and + in this program?

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

op = input("Enter an operation (+, -, *, /): ")

if op == "+":

print(a + b)

elif op == "-":

print(a - b)

elif op == "*":

print(a * b)

elif op == "/":

print(a / b)

else:

print("Invalid operation")

12

102

error

invalid operation

6.

MULTIPLE CHOICE QUESTION

5 sec • 1 pt

Which of the following correctly calculates the average of three numbers entered by the user?

a = int(input())

b = int(input())

c = int(input())

print(a + b + c / 3)

a = int(input())

b = int(input())

c = int(input())

print((a + b + c) / 3)

a = input()

b = input()

c = input()

print((a + b + c) / 3)

a = input()

b = input()

c = input()

print(a + b + c / 3)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output if the user enters 4 and 5 for the following code?

python

x = int(input("Enter first number: "))

y = int(input("Enter second number: "))

print("Result:", x * y)

20

9

45

error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?