calthoff / self_taught

This repository contains the exercises for "The Self-Taught Programmer: The Definitive Guide to Programming Professionally."
http://theselftaughtprogrammer.io
267 stars 226 forks source link

Please guide me #34

Open revolutionarybukhari opened 4 years ago

revolutionarybukhari commented 4 years ago

n=8 count = 0

for i in range(n): for j in range(n): for k in range(n): if i < j and j < k: count += 1

print(count)

output SyntaxError: multiple statements found while compiling a single statement

ConstantArguments commented 4 years ago

You need to indent.

n=8 count = 0

for i in range(n): for j in range(n): for k in range(n): if i < j and j < k: count += 1

print(count)