Click here to Skip to main content
15,562,816 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
For this exercise, assume each topic has three problems: Problem 1, Problem 2 and Problem 3.      Define a map that maps from the topic name, to a list of each topic’s problems.      Build up this map by traversing (i.e. iterating over) the topics set and adding an entry for each topic as key, and the map value being a list of the problems.      Print out this map under the heading Problems:  The output must now reflect the problems map:  Course Topics: * Introduction to Python * Tools of the Trade * How to make decisions * How to repeat code * How to structure data * Functions * Modules Problems: * Introduction to Python : Problem 1, Problem 2, Problem 3 * Tools of the Trade : Problem 1, Problem 2, Problem 3 * (etc.)

What I have tried:

def create_outline():
    TODO: implement your code here

    my_topics = [ "* Introduction to Python", "* Tools of the Trade", "* How to make decisions", "* How to repeat code", "* How to structure data" , "* Functions", "* Functions", "* Modules", "* Modules"]
    my_topics = set(my_topics)
    print("Course Topics:")
    print(*my_topics, sep="\n")
Updated 17-Oct-22 23:28pm
CPallini 18-Oct-22 4:02am    
You tried nothing.
THAMSANQA KHUMALO 18-Oct-22 5:18am    
the question has different sections im done with all the section however the step i was posting wasnt passing the test

1 solution

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
Just saying "TODO: implement your code here" isn't going to get you anywhere.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
Share this answer
THAMSANQA KHUMALO 18-Oct-22 4:30am    
I understand the question.... this project has five steps this is my 2nd step the code i posted was was my first step so i'm done with all the steps but step 2 is not passing the the test wanted some different ideas and its my first time posting....
Richard Deeming 18-Oct-22 4:42am    
Then take this as an opportunity to learn the rules: Nobody here will do your homework for you.
THAMSANQA KHUMALO 18-Oct-22 5:12am    
Thanks really appreciate the the advice and i didn't know, the rules however i have solved the problem...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900