python Intro

python Intro

6th - 8th Grade

8 Qs

quiz-placeholder

Similar activities

Y9 Intro to Python

Y9 Intro to Python

8th Grade

10 Qs

Python Basics

Python Basics

6th - 12th Grade

9 Qs

Python for beginners #1

Python for beginners #1

8th Grade

10 Qs

Python Programming Class Work

Python Programming Class Work

7th Grade

10 Qs

Python Variables

Python Variables

6th Grade

10 Qs

Input and Output Operations in Python

Input and Output Operations in Python

8th Grade

10 Qs

Python II Lesson 2

Python II Lesson 2

5th - 9th Grade

12 Qs

Program Development - Python: Errors

Program Development - Python: Errors

8th - 10th Grade

13 Qs

python Intro

python Intro

Assessment

Quiz

Computers

6th - 8th Grade

Hard

Created by

Yara Rabea

Used 1+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the input() function do in Python?

It prints output to the screen.

It takes input from the user.

It stores data in a file.

It checks whether the user input is valid.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do?

name = input("Enter your name: ")

print("Hello, " + name)

It prints the user's name without greeting.
It greets the user by name.
It stores the name in a variable for later use.
It asks for the user's age.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for taking an input from the user?

readInput()
getInput()
input()
userInput()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the type of value returned by the input() function?

string
integer
boolean
list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print?

age = input("Enter your age: ")

print("You are " , age , " years old.")

You are years old.
Your age is years.
You are old.
You are years old.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will correctly display the string "Python is fun!"?

console.log('Python is fun!')
print('Python is fun!')
print("Python is fun!")
echo 'Python is fun!'

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you ask the user to enter a number and store it in a variable called num?

num = input('Enter a number: ')
num = int(input('Please provide a number: '))
num = 'Please enter a number:'
num = float(input('Please enter a number: '))

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you want to take input from the user and convert it into an integer, which function would you use?

float()
input()
str()
int()