Replit.com ========== `Replit.com `__ and `Trinket.io `__ share many of the same features, but the two sites differ in how they present their workspaces. The previous page explored Trinket, so now let's take a look at Replit.com Create a Replit.com Account --------------------------- .. admonition:: Warning Before signing up for a replit.com account, be sure your school has approved the site for student use! Create a new student account with `Replit.com `__. .. figure:: figures/replit-signup.png :alt: The Replit.com sign-up screen. After you sign in, you will see your *Home* screen, which displays your recent work and announcements. Since you are just starting out, you won’t need to do much on this screen. To begin a new project click on *+ new repl (1) or under Create / Python(2)*. .. figure:: figures/replit-home.png :alt: Replit.com home screen. Home screen The following screen will pop up. Scroll through the options and select *Python (3)*. Next, name your project (4) and click *Create Repl (5)*. .. figure:: figures/replit-newrepl.png :alt: Create a new Python repl. The Replit.com Workspace ------------------------ Now let's take a look at how to use Replit. The workspace consists of three main panels and several menu functions. .. figure:: figures/replit-overview.png :alt: Replit.com code editor layout Features to note: #. **File panel and menus**: Allows you to add extensions, update settings, and add, open, or delete files. #. **Editor panel**: Your code goes here. Click on a file to open it in the editor. For most new projects, a ``main.py`` file will be created and opened by default. #. **Console panel**: Any output produced by your code will appear in this panel. The console also displays error messages, test results, and other information. #. **Run button**: Executes any code written in the ``main.py`` file. #. **Share button**: Allows you to share your projects. #. **Managing projects**: When logged into Repl.it, you can create a new project and view your saved projects. .. admonition:: Note The workspace shown above uses the "light" theme (dark text on a white background). If you prefer the reverse (light text on a black background), click the gear icon and select the "dark" theme. Try It! ------- Repeat your ``Hello, World!`` program in the editor. Replit.com automatically saves your work, so your changes should not be lost when you logout or refresh the page. At any time, you can return to a list of your saved projects by clicking on the menu bars next to your username and selecting *My Repls*. .. figure:: figures/replit-menu-dropdown.png :alt: Main menu dropdown options. Forking - Creating Your Own Copy -------------------------------- .. index:: ! fork button **Fork button**: If you are viewing someone else's project, or clicking on a Repl from this textbook, you can *Fork* the content and save a copy of the project to your own account. This allows you to edit the files without changing the originals. It also lets you use other programmers' work (with permission) to enhance your own. .. figure:: figures/replit-forking.png :alt: Replit.com how to copy/fork someone elses repl .. admonition:: Note If you are not signed into your Replit account, a prompt to sign-in will appear when you try to fork. You may notice the Edit in workspace button and think thats what you want. However the following warning will pop up. Again, you want your own copy and to *fork* the repl! .. figure:: figures/replit-edit_in_workspace.png :alt: Replit.com why you don't want to press edit in workspace button