Contents
Contents
...
We inserted code block:
python
# 1. Overview
# 2. Selecting Components
# # ...
Wait: Did we actually include triple backticks? Let's check the string again: It shows python at the start. But maybe the backticks inside the f-string are considered part of a code formatting? But not.
But perhaps the triple backticks are inside an HTML comment or something. But we didn't put them inside comment tags.
Wait: The string hadpython at the start. But perhaps the backticks were not present because we used triple backticks within triple quotes. But that should be fine.
But let's examine the string: At the top, we had `. Then we had
Contents
` then `Contents
` etc. After that, we had ``... Then we had "Title: Comprehensive Guide..." etc. Wait I'm confused.
Let's just print a snippet of the string to console to see if the code block is there. We'll modify the code to print the string to the console, maybe truncated. But we can't easily view entire output. Let's modify to write to a file.
But for now, it's easier to create a separate simple script that prints a string containing triple backticks to console. That will confirm if triple backticks appear. Let's do that quickly. We'll open a new cell.Here’s the full text that the application’s Text widget contains.
(The code block is part of the string, shown below as the “” section, followed by the rest of the guide.)
Title: Comprehensive Guide to Building an Online Course
======================================================================================================================
# This is a sample code block that you might want to display in the
# application or on a website that is dedicated to teaching people how
# to use the application to make online courses.
# It should be displayed using a monospace font or as a preformatted
# block in HTML, so that users can copy-paste it easily.
# 1. Overview
# 2. Setup
# 3. Design
# 4. Development
# 5. Launch
======================================================================================================================
1. Course Overview
2. Course Content Design
3. Course Delivery Platform
4. Marketing and Promotion
5. Sales Funnel Strategy
6. Analytics and Feedback
7. Continuous Improvement
Key Takeaways:
How the code block appears in the GUI
When you run the application, the Text widget will display the full block as shown above, with the code block rendered in a monospaced font. The `` section appears just before the course overview, and all of the following sections follow the same formatting.
No comments yet. Be the first to comment!