If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Challenge: Recycling sort

Instructions

Step 1

Recycle plastic

Sefa started a recycling service at his school. To help it succeed, he’s building an app where students can enter information about an item, and then the app tells them whether it belongs in the trash or in the recycling. Sefa wants to start the service by recycling plastic.

  • Add a conditional that sets waste_type to the value "recycling" if the item is plastic.

An item is plastic if the variable material contains the value "plastic". For all other materials, waste_type should contain "trash".

Code editor

Code files

Output