Hello,

this looks to me like it might be a piece of homework, as it would be given by teachers or professors.

This list has got the rule, that members do not solve other's homework. Because very often homework is meant to sit down and think about it.

But maybe I interpreted that wrongly, so if you could try to formulate in words what this loop does, I or other people on this list, will be pleased to show you where you might have got things wrong and how it really works.

Cheers

Lars


--
Lars Liedtke
Software Entwickler

                        
Phone:  
Fax:    +49 721 98993-
E-mail: l...@solute.de


solute GmbH
Zeppelinstraße 15                               
76185 Karlsruhe
Germany


Marken der solute GmbH | brands of solute GmbH
billiger.de | Shopping.de

Geschäftsführer | Managing Director: Dr. Thilo Gans, Bernd Vermaaten
Webseite | www.solute.de
Sitz | Registered Office: Karlsruhe
Registergericht | Register Court: Amtsgericht Mannheim
Registernummer | Register No.: HRB 110579
USt-ID | VAT ID: DE234663798


Informationen zum Datenschutz | Information about privacy policy
http://solute.de/ger/datenschutz/grundsaetze-der-datenverarbeitung.php

Am 05.08.22 um 09:34 schrieb ojomooluwatolami...@gmail.com:
Hello, I’m new to learning python and I stumbled upon a question nested loops. 
This is the question below. Can you please how they arrived at 9 as the answer. 
Thanks

var = 0
for i in range(3):
   for j in range(-2,-7,-2):
     var += 1
      print(var)

Sent from my iPhone

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to