Q&A Discussions
In the continue Loop -
i = 0
while True:
i = i +1
if i == 2:
print("Skipping 2")
continue
if i == 5:
print("Breaking")
break
print(i)
print("Finished")
It shows the output being
"1
Skipping 2
3
4
Breaking
Finished"
Why are the last three lines not
"Breaking
5
Finished"
Where it shows print(i) after break?
1 Vote
3 AnswersCan you help me in this code?
-4 Votes
9 AnswersWhat is wrong with this code?
-
-
<!Doctype html>
<head>
</head>
<body>
<form>
<input type="text" id="input">
</form>
<button type="button" id="button">Click here</button>
<script>
var input=document.getElementById("input");
var button=document.getElementById("button");
function display() {
if (button.clicked == true) {
console.log("input");
}
};
display();
</script>
</body>
0 Votes
7 AnswersHow can I make a reference for a list of variables. If false i want the system to check through all my variable to make sure they are false.
Code-
var2 = "Tanner"
var3 = "Jake"
question = input('What is your name? ')
if question == var2:
print('\nWelcome Back Tanner!')
if question == var3:
print('\nWelcome Back Jake!")
if question !=( This is where i need help!)( Is the != the correct way to write not equal?)
0 Votes
4 AnswersWhy does an error pop up here:
var1 = "Trey"
var2 = "Tanner"
var3 = "Ellis"
var4 = "Jake"
var5 = "Christine"
question = input('What is your name? ')
if question == "var1":
print('Welcome Back Trey')
Error:
Traceback (most recent call last):
File "Hi.py", line 6, in <module>
question = input('What is your name? ')
File "<string>", line 1, in <module>
NameError: name 'Trey' is not defined
0 Votes
10 AnswersHot today
Sticky position
3 Votes
Help please?
3 Votes
Online voting system
2 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes