id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
Mmdn_Instance_console/4421372_33_0.txt | Why not use the fact that you are computing ` startingBal * 1.01**numberOfDays
` ?
Look at this page, especially problem 4 | |
Mmdn_Instance_console/python-for-loop-example3_55_0.txt | 18/36 Understanding List Comprehensions in Python 3
19/36 Understanding Tuples in Python 3 | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_100_0.txt | forEach array of objects iteration action example
### 👩💻 Technical question | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_42_0.txt | JavaScript Math built-in object mathematical functions
### 👩💻 Technical question | |
Mmdn_Instance_console/python-for-loop-example3_86_0.txt | In the below example, Iâve used number 3 as the step and you can see the
output numbers are the previous number + 3.
for n in range(1, 10, 3):
print("Printing with step:", n)
# Output
# Printing with step: 1
# Printing with step: 4
# Printing with step: 7
| |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_69_0.txt | Asked 3 months ago in JavaScript by Nicole
what does .reduce() do? | |
Mmdn_Instance_console/python-for-loop-example3_129_0.txt | ⢠June 2, 2018
Hi Pankaj, problem lies with this line âprint letterâ. It should be print
(letter) | |
Mmdn_Instance_console/python-for-loop-example3_123_0.txt | JournalDev
DigitalOcean Employee | |
Mmdn_Instance_console/python-for-loop-example3_85_0.txt |
for x in range(3):
print("Printing:", x)
# Output
# Printing: 0
# Printing: 1
# Printing: 2
The range function also takes another parameter apart from the start and the
stop. This is the step parameter . It tells the range function how many
numbers to skip b... | |
Mmdn_Instance_console/Mmdn_Instance_console_13_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/python-for-loop-example3_125_0.txt | \- G N Deepak Sravan
JournalDev | |
Mmdn_Instance_console/python-for-loop-example3_4_0.txt | * App Platform
Get apps to market faster
* Compute | |
Mmdn_Instance_console/python-for-loop-example3_130_0.txt | \- Madhubanti Jash
JournalDev | |
Mmdn_Instance_console/python-for-loop-example3_158_0.txt | * Support
* Sales
* Report Abuse
* System Status
* Share your ideas
© 2024 DigitalOcean, LLC. Sitemap . | |
Mmdn_Instance_console/4829974_13_0.txt | * Home
* Subforums
* FAQ/Guidelines
* Terms of Service
* Privacy Policy
Powered by Discourse , best viewed with JavaScript enabled | |
Mmdn_Instance_console/4421372_26_0.txt | Right, I agree with what iahleen is saying.
So, you can increment and stop at your goal. Now, can you multiply that
number? If you change one line, you can have it do an increase as interest.
The next step would be to have another variable to keep track of what
iteration you are on, but that’s simple incrementing. | |
Mmdn_Instance_console/python-for-loop-example3_156_0.txt | * Tutorials
* Q&A
* CSS-Tricks
* Write for DOnations
* Currents Research
* Hatch Startup Program
* Shop Swag
* Research Program
* Open Source
* Code of Conduct
* Newsletter Signup
* Meetups
###### Solutions | |
Mmdn_Instance_console/4829974_1_0.txt | JavaScript
stephenoshilaja October 24, 2021, 6:31pm 1 | |
Mmdn_Instance_console/Mmdn_Instance_console_21_2.txt | la.social/@mdn)
* [ MDN on X (formerly Twitter) ](https://twitter.com/mozdevnet)
* [ MDN on GitHub ](https://github.com/mdn/)
* [ MDN Blog RSS Feed ](/en-US/blog/rss.xml)
## MDN
* [ About ](/en-US/about)
* [ Blog ](/en-US/blog/)
* [ Careers ](https://www.mozilla.org/en-US/careers/listings/?team=ProdOp... | |
Mmdn_Instance_console/4421372_19_0.txt | jsdev3 January 25, 2021, 5:05am 10
Yep. This is precisely where I run into an issue. The only amount I can
increment the variable by is 1. Instead I want to increment by a percentage. | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_50_0.txt | button label onclick changeLabel innerHTML
### 👩💻 Technical question | |
Mmdn_Instance_console/Mmdn_Instance_console_16_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/Mmdn_Instance_console_16_1.txt | timeStamp() ` ](/en-US/docs/Web/API/console/timestamp_static) Non-standard
21. [ ` trace() ` ](/en-US/docs/Web/API/console/trace_static)
22. [ ` warn() ` ](/en-US/docs/Web/API/console/warn_static)
4. Related pages for Console API
1. [ ` Window.console ` ](/en-US/docs/Web/API/Window/console)
2. _[ ` ... | |
Mmdn_Instance_console/Mmdn_Instance_console_16_3.txt |
{str:"Some text", id:5}
#### Outputting multiple objects
You can also output multiple objects by listing them when calling the logging
method, like this:
js
const car = "Dodge Charger";
const someObject = { str: "Some text", id: 5 };
console.info("My first car was a", car, ".... | |
Mmdn_Instance_console/4421372_38_0.txt | > Why not use the fact that…
I think he was looking to work on loops and also wanted a count of iterations. | |
Mmdn_Instance_console/python-for-loop-example3_96_0.txt |
def print_sum_even_nums(even_nums):
total = 0
for x in even_nums:
if x % 2 != 0:
break
total += x
else:
print("For loop executed normally")
print(f'Sum of numbers {total}')
# this will print the... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_61_0.txt | Asked 3 months ago in JavaScript by Krystle
How do I use backtick in javascript | |
Mmdn_Instance_console/Mmdn_Instance_console_23_2.txt | tes/)
* [ Cookies ](https://www.mozilla.org/privacy/websites/#cookies)
* [ Legal ](https://www.mozilla.org/about/legal/terms/mozilla)
* [ Community Participation Guidelines ](https://www.mozilla.org/about/governance/policies/participation/)
Visit [ Mozilla Corporationâs ](https://www.mozilla.org) not-for-prof... | |
Mmdn_Instance_console/4421372_41_0.txt | 1 Like
system Closed July 27, 2021, 6:43am 20 | |
Mmdn_Instance_console/python-for-loop-example3_98_0.txt |
sharks = ['hammerhead', 'great white', 'dogfish', 'frilled', 'bullhead', 'requiem']
for shark in sharks:
print(shark)
In this case, we are printing out each item in the list. Though we used the
variable ` shark ` , we could have called the variable any other valid
variable name and... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_65_0.txt | Asked 3 months ago in JavaScript by HOORA
What is await in js | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_72_0.txt | toFixed method format number decimal places
### 👩💻 Technical question | |
Mmdn_Instance_console/python-for-loop-example3_137_0.txt | Sign up
### Popular Topics | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_28_0.txt | ignore spaces prompt trim replace
### 👩💻 Technical question | |
Mmdn_Instance_console/Mmdn_Instance_console_4_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_111_0.txt | Asked 4 months ago in JavaScript by Caroline
how to sum all numbers in a range | |
Mmdn_Instance_console/python-for-loop-example3_155_0.txt | * Products Overview
* Droplets
* Kubernetes
* Paperspace
* App Platform
* Functions
* Cloudways
* Managed Databases
* Spaces
* Marketplace
* Load Balancers
* Block Storage
* Tools & Integrations
* API
* Pricing
* Documentation
* Release Notes
* Uptime
###### Commu... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_8_0.txt | #
Ask a coding question for FREE | |
Mmdn_Instance_console/python-for-loop-example3_99_0.txt |
Output
hammerhead
great white
dogfish
frilled
bullhead
requiem
The output above shows that the ` for ` loop iterated through the list, and
printed each item from the list per line. | |
Mmdn_Instance_console/python-for-loop-example3_134_0.txt | ⢠May 30, 2018
Python tutorials are really very helpful. But there are some errors in
codes.Like in python nested loop example in print function. | |
Mmdn_Instance_console/python-for-loop-example3_33_0.txt | Featured Articles
* Cloud cost optimization best practices | |
Mmdn_Instance_console/python-for-loop-example3_35_0.txt | Read more
* Understanding cash flow vs. profit | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_62_0.txt | backtick template literals string literals variable interpolation
### 👩💻 Technical question | |
Mmdn_Instance_console/python-for-loop-example3_81_0.txt |
words= ["Apple", "Banana", "Car", "Dolphin" ]
for word in words:
#This loop is fetching word from the list
print ("The following lines will print each letters of "+word)
for letter in word:
#This loop is fetching letter for the word
... | |
Mmdn_Instance_console/python-for-loop-example3_60_0.txt | 28/36 How To Use *args and **kwargs in Python 3
29/36 How To Construct Classes and Define Objects in Python 3 | |
Mmdn_Instance_console/python-for-loop-example3_61_0.txt | 30/36 Understanding Class and Instance Variables in Python 3
31/36 Understanding Class Inheritance in Python 3 | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_92_0.txt | object prompt matching data iteration Object.entries()
### 👩💻 Technical question | |
Mmdn_Instance_console/4421372_11_0.txt | kevinSmith January 25, 2021, 4:28am 6
You have a few problems here. | |
Mmdn_Instance_console/python-for-loop-example3_69_0.txt | Anytime you have need to repeat a block of code a fixed amount of times. If
you do not know the number of times it must be repeated, use a âwhile
loopâ statement instead.
## For loop Python Syntax | |
Mmdn_Instance_console/python-for-loop-example3_29_0.txt | * Quickstart
* Compute
* Storage
* Managed Databases
* Containers
* Billing
* API Reference
* Partners | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_67_0.txt | Asked 3 months ago in JavaScript by Anastasiia
what is .toLowerCase() | |
Mmdn_Instance_console/python-for-loop-example3_34_0.txt | Read more
* How to choose a cloud provider | |
Mmdn_Instance_console/python-for-loop-example3_146_0.txt | ## DigitalOcean Products
Cloudways Virtual Machines Managed Databases Managed Kubernetes Block
Storage Object Storage Marketplace VPC Load Balancers | |
Mmdn_Instance_console/python-for-loop-example3_70_0.txt | The basic syntax of the for loop in Python looks something similar to the one
mentioned below.
for itarator_variable in sequence_name:
Statements
. . .
Statements
| |
Mmdn_Instance_console/4421372_39_0.txt | > Is this the proper way to complete a task like this, or is there a better
> way?
Sure, that works. I’m not sure that you need to reassign startingBal \- for
one thing it makes that name misleading. I would just call it balence and
use the ` *= ` operator. | |
Mmdn_Instance_console/python-for-loop-example3_138_0.txt | * Ubuntu
* Linux Basics
* JavaScript
* Python
* MySQL
* Docker
* Kubernetes
* All tutorials
* Talk to an expert
##### Join the Tech Talk | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_105_0.txt | Asked 4 months ago in JavaScript by Kali
how to make an svg image using javascript | |
Mmdn_Instance_console/python-for-loop-example3_95_0.txt | Letâs say we have a function to print the sum of numbers if and only if all
the numbers are even.
We can use break statement to terminate the for loop if an odd number is
present. We can print the sum in the else part so that it gets printed only
when the for loop is executed normally. | |
Mmdn_Instance_console/4829974_9_0.txt | by the way, the choices were pulled from a text file. i hope just looking at
the code can help
ilenia October 24, 2021, 7:10pm 4 | |
Mmdn_Instance_console/python-for-loop-example3_62_0.txt | 32/36 How To Apply Polymorphism to Classes in Python 3
33/36 How To Use the Python Debugger | |
Mmdn_Instance_console/4421372_13_0.txt | 1 Like
jsdev3 January 25, 2021, 4:38am 7 | |
Mmdn_Instance_console/python-for-loop-example3_57_0.txt | 22/36 How To Write Modules in Python 3
23/36 How To Write Conditional Statements in Python 3 | |
Mmdn_Instance_console/4421372_34_0.txt | sosmath.com
### APPLICATIONS OF EXPONENTIAL AND LOGARITHMIC FUNCTIONS | |
Mmdn_Instance_console/python-for-loop-example3_66_0.txt | * Python
Pankaj | |
Mmdn_Instance_console/python-for-loop-example3_32_0.txt | * Resources
* Customer Stories
* Hatch Startup Program
* Price Estimate Calculator
* Marketplace
* Security
* Training for Agencies & Freelancers | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_46_0.txt | difference comparison double equals triple equals
### 👩💻 Technical question | |
Mmdn_Instance_console/Mmdn_Instance_console_18_1.txt | . [ ` timeStamp() ` ](/en-US/docs/Web/API/console/timestamp_static) Non-standard
21. [ ` trace() ` ](/en-US/docs/Web/API/console/trace_static)
22. [ ` warn() ` ](/en-US/docs/Web/API/console/warn_static)
4. Related pages for Console API
1. [ ` Window.console ` ](/en-US/docs/Web/API/Window/console)
2.... | |
Mmdn_Instance_console/python-for-loop-example3_11_0.txt | * Paperspace
Cloud Website Hosting | |
Mmdn_Instance_console/Mmdn_Instance_console_0_2.txt | 29fb784d58c61873ce4a133a%0A*+Document+last+modified%3A+2024-03-06T05%3A58%3A29.000Z%0A%0A%3C%2Fdetails%3E
"This will take you to GitHub to file a new issue.")
[ MDN logo ](/)
Your blueprint for a better internet.
* [ MDN on Mastodon ](https://mozilla.social/@mdn)
* [ MDN on X (formerly Twitter) ](https://twit... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_108_0.txt | iterate numbers sum negative if statement loop
### 👩💻 Technical question | |
Mmdn_Instance_console/Mmdn_Instance_console_2_1.txt | . [ ` timeStamp() ` ](/en-US/docs/Web/API/console/timestamp_static) Non-standard
21. [ ` trace() ` ](/en-US/docs/Web/API/console/trace_static)
22. [ ` warn() ` ](/en-US/docs/Web/API/console/warn_static)
4. Related pages for Console API
1. [ ` Window.console ` ](/en-US/docs/Web/API/Window/console)
2.... | |
Mmdn_Instance_console/python-for-loop-example3_124_0.txt | ⢠August 19, 2020
How to use for loop in calculator program in python using functions optimized
code | |
Mmdn_Instance_console/Mmdn_Instance_console_9_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/Mmdn_Instance_console_12_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/4421372_32_0.txt | I would not do it like this. I would use some arithmetic to make this much
faster.
You are computing ` startingBal * 1.01 * 1.01 * 1.01 * ... * 1.01 ` . | |
Mmdn_Instance_console/python-for-loop-example3_38_0.txt | * Log in
* Log in to:
* Community
* DigitalOcean
* Sign up
* Sign up for:
* Community
* DigitalOcean
* Blog
* Docs
* Get Support
* Contact Sales | |
Mmdn_Instance_console/4421372_9_0.txt | Sure. I suspect I am missing something in the loops, because I can only get it
to print the first result, not update the base value and repeat.
let x = 1
while (x < 100) {
let y = x*1.01
console.log(y)
}}
| |
Mmdn_Instance_console/4421372_0_0.txt | The freeCodeCamp Forum
# Trouble with looping script, returning 1% interest gained | |
Mmdn_Instance_console/python-for-loop-example3_18_0.txt | * Minecraft Hosting
* IOT Connect to the power of the cloud | |
Mmdn_Instance_console/Mmdn_Instance_console_22_1.txt | melog_static)
20. [ ` timeStamp() ` ](/en-US/docs/Web/API/console/timestamp_static) Non-standard
21. [ ` trace() ` ](/en-US/docs/Web/API/console/trace_static)
22. [ ` warn() ` ](/en-US/docs/Web/API/console/warn_static)
4. Related pages for Console API
1. [ ` Window.console ` ](/en-US/docs/Web/API/Wi... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_15_0.txt | Asked 5 days ago in JavaScript by Lenka
can you explain switch statements in javascript | |
Mmdn_Instance_console/python-for-loop-example3_48_0.txt | 4/36 How To Write Doctests in Python
5/36 Understanding Data Types in Python 3 | |
Mmdn_Instance_console/python-for-loop-example3_68_0.txt | In this article, weâll explore the Python for loop in detail and learn to
iterate over different sequences including lists, tuples, and more.
Additionally, weâll learn to control the flow of the loop using the break
and continue statements .
## When to use for Loop | |
Mmdn_Instance_console/4829974_2_0.txt | I am running a code that loops 7 times and I have made it to console.log the
user input for every loop. I want to put each console.log output into an
array. how do I go about doing this?
the following is my output | |
Mmdn_Instance_console/python-for-loop-example3_31_0.txt | * Become a partner
Join our Partner Pod to connect with SMBs and startups like yours.
* Marketplace
Power up your app with pre-built solutions. | |
Mmdn_Instance_console/python-for-loop-example3_84_0.txt | * ` start ` states the integer value at which the sequence begins, if this is not included then ` start ` begins at 0
* ` stop ` is always required and is the integer that is counted up to but not included
* ` step ` sets how much to increase (or decrease in the case of negative numbers) the next iteration, if ... | |
Mmdn_Instance_console/python-for-loop-example3_6_0.txt | * Backups
* Snapshots
* SnapShooter
Storage | |
Mmdn_Instance_console/Mmdn_Instance_console_19_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/python-for-loop-example3_21_0.txt | * Web and Mobile Apps Simple cross-platform app hosting
* cPanel
* Docker
* Next.js
* Node.js
* Website Hosting Fast page loads and reliable site uptime | |
Mmdn_Instance_console/python-for-loop-example3_106_0.txt | When using dictionaries with ` for ` loops, the iterating variable corresponds
to the keys of the dictionary, and ` dictionary_variable[iterating_variable] `
corresponds to the values. In the case above, the iterating variable ` key `
was used to stand for key, and ` sammy_shark[key] ` was used to stand for the
values.... | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_107_0.txt | Asked 4 months ago in JavaScript by Caroline
How to iterate through numbers and return a string message if the sum is negative | |
Mmdn_Instance_console/python-for-loop-example3_74_0.txt | Output :
a
n
a
c
o
n
d
a
| |
Mmdn_Instance_console/python-for-loop-example3_30_0.txt | * Grow Your Business
* Find a partner
Work with a partner to get up and running in the cloud. | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_20_0.txt | join method Array string separator
### 👩💻 Technical question | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_84_0.txt | Axios HTTP requests browser Node.js request methods interceptors headers
errors
### 👩💻 Technical question | |
Mmdn_Instance_console/75038-javascript-for-loop-examples-print-numbers-and-sum-array-elements9_94_0.txt | arguments function input behavior example
### 👩💻 Technical question | |
Mmdn_Instance_console/Mmdn_Instance_console_17_0.txt | * Skip to main content
* Skip to search
* Skip to select language
[ MDN Web Docs ](/en-US/) Open main menu
* References [ References ](/en-US/docs/Web)
* [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web)
* [ HTML Structure of content on the web ](/en-US/do... | |
Mmdn_Instance_console/Mmdn_Instance_console_1_1.txt | I/console/timelog_static)
20. [ ` timeStamp() ` ](/en-US/docs/Web/API/console/timestamp_static) Non-standard
21. [ ` trace() ` ](/en-US/docs/Web/API/console/trace_static)
22. [ ` warn() ` ](/en-US/docs/Web/API/console/warn_static)
4. Related pages for Console API
1. [ ` Window.console ` ](/en-US/doc... | |
Mmdn_Instance_console/python-for-loop-example3_42_0.txt | 4. ## Using the for loop to iterate over a Python list or tuple
5. ## Nesting Python for loops | |
Mmdn_Instance_console/python-for-loop-example3_58_0.txt | 24/36 How To Construct While Loops in Python 3
25/36 Python for loop |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.