# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + deletable=false
# Please run this cell first.
from demo.demo import next_puzzle, cur_puzzle, puzzle, give_up
# -

# # Instructions
#
# * This [Jupyter](https://jupyter.org/) notebook is a demo simulating the study used for the [**Programming Puzzles**](https://arxiv.org/abs/2106.05784) paper (with some modifications to run locally).
# * You can reuse the same notebook cells to solve all puzzles (run cell with Ctrl+Enter), or open new cells as you advance (Shift+Enter).
#
#
# * **Visit our repository** to explore the full dataset and **contribute your own new puzzles**: https://github.com/microsoft/PythonProgrammingPuzzles.
# * Share this demo with friends by sending this link: https://aka.ms/python_puzzles_study
# * For a shorter intro, and to see which puzzles the AI baselines solved, visit: https://aka.ms/python_puzzles
#
# ## Overview
#
#
# * The first 3 problems are "practice" and the time you take will not be counted. This is a good chance to see how the system works.
# * Puzzles are defined by `def puzzle(...)`. For each puzzle, you will try to find an input `x` which makes `puzzle(x)` return `True`.
# * Type `next_puzzle()` when you are ready to start the first problem or to advance to the next problem.
# * There is **no option to revisit a puzzle** and once you call `next_puzzle()` the clock starts ticking (you have up to 6 minutes per puzzle).
# * **If you get lost, call `cur_puzzle()`** to see the current puzzle you are on (and time bar).
#
# ## Timing
#
# * You have up to 6 minutes for each puzzle.
# * If you do not solve a problem in **6 minutes**, move to the next puzzle by typing `next_puzzle()`.
# * If you would like to give up and skip to the next puzzle without waiting, you can call `give_up()`.
#
#
# ## Possible issues
#
# * Remember to use `cur_puzzle()` if you lost the code of the current puzzle.
# * For any feedback, please visit our [GitHub repository](https://github.com/microsoft/PythonProgrammingPuzzles) and reach out to us by email.
#
#
# ## Summary of functions
#
# | Function             	| Description                                                                              	|
# |:----------------------	|:------------------------------------------------------------------------------------------	|
# |`next_puzzle()`        	| Start the next puzzle (call only when you are ready to start! no revisiting)             	|
# |`cur_puzzle()`         	| Present the current puzzle (useful if you got lost or accidentally overridden `puzzle()`) 	|
# |`puzzle(...)`          	| Submit a solution to the current puzzle                                                  	|
# |`give_up()`          	| Give up and skip to the next puzzle *before* 6 minutes have passed. Please avoid this option if possible. |

# +
# The first 3 puzzles are warmup. Begin the warmup part by running this cell.

next_puzzle()

# +
# Solve the first puzzle by running this cell.

puzzle("world")

# +
# when you are ready to continue, run this cell.

next_puzzle()
# -

# You're on your own. Have fun.






StarcoderdataJupyterScriptsDedupFiltered