[SOLVED] Problem with while true loop (saying I need ':')


#1

Hi everyone, I am having a problem with using while true loop.

I am writing while-true loop:

but after this, I am getting the exclamation mark error, and it says I need a ‘:’ after while true loop.

I am putting : at the end, and have also tried putting ‘:’

any idea what I am doing wrong? I am completely new to coding, so am probably making a simple mistake.


#2

My apologies, I have figured out my error.

I do not need to actually write loop, I just need to write-

while True:

Thank you all though, I am sure you will see me a lot on these forums, and I apologise in advance if I ask a lot of questions.


#3

For javascript is while True {}.


#4

can you share the while true line please


#5

Please do not bring up dead topics.

In Python, a while loop is written like: while True:
In Lua, a while loop is written like: while true do
In JavaScript, a while loop is written like: while (true) {


#6

thank you
I just started and will not bring up “dead topics” in the future