Search Header Logo
P1L6cp

P1L6cp

Assessment

Presentation

World Languages

KG

Practice Problem

Easy

Created by

joeee joeee

Used 2+ times

FREE Resource

1 Slide • 4 Questions

1

If else and operations in Python

2

Open Ended

What is the output from the following print() statements?


print("hello" + "hello")
a = "hello"
print(a[1])
print(a[-1])
print(a 3)
print(a
a) # no -, /, //
print(10 % 3) # getting remainder

3

Open Ended

What is the output of the following code when variable a equals the different values

a = 10 output: ?


a = ?

b = 10

c = 5

if a > b:

    print("hello")

elif a <= b and a > c:

    print("goodbye")

else:

    print("last one")

4

Open Ended

What is the output of the following code when variable a equals the different values?

a = 5 output: 

a = 15 output:


a = ?

b = 10

c = 5

if a > b:

    print("hello")

elif a <= b and a > c:

    print("goodbye")

else:

    print("last one")

5

Open Ended

Write a program that asks the user to enter 3 numbers, one at a time, your program will check which value is the largest and print out that number!


finish code below:

num1 = input(“please enter a number”)

num2  = input()

num3  = input()

if num1 >= num2 and num1 >= num3:

If else and operations in Python

Show answer

Auto Play

Slide 1 / 5

SLIDE