Hi Jorena, this is just an example .rst file
If you look on the right of this text box you will see a pushbutton 'RAW'
Press that to see the actual code used to create this file.
A really nice example is https://gist.github.com/dupuy/1855764
Hi Jorena, this is just an example .rst file
If you look on the right of this text box you will see a pushbutton 'RAW'
Press that to see the actual code used to create this file.
A really nice example is https://gist.github.com/dupuy/1855764
1 | 2 | 3 | 4 | 5 | 6 | 7 | |
---|---|---|---|---|---|---|---|
2 | 4 | 6 | 8 | 10 | 12 | 14 | |
324 | 123 | 345 | 564 | 567 | 345 | 554 |
""" | |
Turtle graphics demo. | |
Reference: https://www.geeksforgeeks.org/turtle-programming-python/ | |
""" | |
import turtle | |
wn = turtle.Screen() | |
wn.bgcolor("light green") |
# Goal is to capture output from print() to a nice box with scrollbars | |
# These print statements are proxies for what really does the printing, so I can't change them. | |
import ipywidgets as widgets | |
from ipywidgets import HBox, IntSlider, Text, Label, Output | |
# Attempt #1 | |
a = Output() | |
with a: | |
for i in range (50): | |
print(f"Hello {i}") |
""" Program to accept list of numbers and return smallest and largest """ | |
def main(): | |
print("Enter numbers. Type 'done' for the number to compute min and max") | |
smallest = largest = None | |
while True: | |
user_entry = input('enter a number ') | |
if user_entry == 'done': | |
break | |
try: |
import time | |
while True: | |
print("How long or 'exit' when finished") | |
try: | |
uin = input(">> ") | |
except Exception: | |
break | |
if uin == 'exit': | |
break |
import os | |
# User entry of folder name. Make it. | |
folder = input("Folder name:") | |
try: | |
os.makedirs(folder) | |
except: | |
pass | |
# User entry of file base. Build full path. |
# Fixed version. | |
# Minimal changes to get it working | |
my_string = "This is a bunch of words!" | |
print(f'{my_string}') | |
alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
outputStr = '' | |
for i in my_string: | |
for idx, j in enumerate(alphabet): |
import time | |
counter = 0 | |
while counter < 10: | |
print(f'\r{counter}', end='') | |
time.sleep(1.0) | |
counter += 1 | |
print("Done.") |
{ "editor.insertSpaces": true, "editor.fontFamily": "JetBrains Mono, Cascadia Code PL, Droid Sans Mono", "editor.fontLigatures": true, "editor.minimap.showSlider": "always", "editor.multiCursorModifier": "ctrlCmd", "editor.renderControlCharacters": true, "editor.renderIndentGuides": true, "editor.renderWhitespace": "boundary", "editor.rulers": [100],