Eddie Domingues Eddie Domingues - 3 months ago 15
Python Question

Python Syntax Error: expected an intended block

So first i clicked on Run Module



So first i clicked on Run Module

Then this came up



Error Image 2

My code

import time
print("First we need to know you.")

print("Enter your name please.")
time.sleep(2)
name = input("Name: ")
print("Welcome, " + name + "!")
time.sleep(3)
criminal = input("Are you a criminal?: ")
if criminal=='Y':


Right here it highlights print as red

print('Oh no')
elif criminal=='N':
print('Thank god!')

Answer

You need to indent after an if and the elif:

if criminal=='Y':
    print('Oh no')
elif criminal=='N':
    print('Thank god!')

Also, don't indent after the import:

import time
print("First we need to know you.")