No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
manpreet
Best Answer
2 years ago
I'm trying to make a quiz app using Django, Jinja2 and PostgreSQL. I want to number the questions but I don't know how to because python doesn't use a counter in for loops (e.g. for exercise in exercises - no for loop here)
I've tried to change the for loop
so it has a counter
and defining myrange in views.py to be a range(1, len(exercitii+1)) but after that I didn't know how to access the elements inside the Jinja template. I tried to access the exercises with
but it didn't work.
html template