Questions tagged as 'else'

2
answers

How to change variable value after the user submits a form?

This code will print <i class="far fa-star"></i> if rowCount == 0 and if > 0 will print <i class="fas fa-check"></i> , after the user submits the form they will not be able to see <i cl...
asked by 25.11.2018 / 19:30
2
answers

Indentation in statement else

Hello, I would like a clarification on the difference in the indentation of the else, "out" of the if. In case it is to return the primus numbers to the nth value 'n'. First case: for i in range(2, n): for j in range(2, i): if i...
asked by 05.03.2018 / 21:44
1
answer

Update variable within IF

Good morning, I'm not able to update a variable inside the IF structure and then use it in my code. Here is an excerpt from my code: while ($dado_participante = mysqli_fetch_array($qry2)) { //REGISTRO 0150: TABELA DE CADASTRO DO PA...
asked by 26.10.2017 / 15:34
1
answer

Why are not you entering this if / else? [duplicate]

I run this code and if / else if are not entering. What can it be? import java.util.Scanner; public class VerificaLetra { public static void main(String[] args) { String sexo = " "; String letra; Scanner scan;...
asked by 28.02.2017 / 17:34
1
answer

How to select a switch / case statement with each click on the button

I would like to make a list of A-Z . One detail, is based on breaking / dividing this list (gem) alphabet into parts: Although my difficulty is in, after being clicked on the button, the same bring the list like this: First click...
asked by 14.04.2016 / 02:38
1
answer

Error writing IF and Else in jquery [duplicate]

I'm starting to venture into the development world now and hit a question when using IF and Else. The code below is OK <select id="course_list" > <?php $my_query = new WP_Query('tribe_events_cat=petroleo-e-gas'); ?>...
asked by 27.08.2015 / 09:54
1
answer

Problem with IF / ELSE and variables

I started to study Python very soon, and created the following code: gene = open("AY365046.1.txt","r") g=0; a=0; c=0; t=0; gene.readline() for line in gene: line = line.lower() for char in line: if char == "g": g...
asked by 14.08.2015 / 10:04
1
answer

How to make conditional receive a parameter followed by an argument

I've been trying to create a if..else structure with a passing parameter. See: Example $ opt-get -i pacote.tgz    This, I'm creating something similar to the apt-get tool of the Debian Operating System . I have made...
asked by 03.12.2016 / 23:22
1
answer

else condition being called at the wrong time

I'm currently having trouble with a job code. My ELSE class is always being executed, but only when I choose the option for the first IF. import java.util.Scanner; public class BikeFit2 { public static void main( String[] args ) { Scanner...
asked by 14.09.2016 / 19:09
1
answer

If else if in Javascript

I'm developing an application using phonegap / cord which stores data using localStorage and I'm having a problem in javascript ... I'm calling a function to save () my data, a function to load () and a rank () function. I am checking the local...
asked by 19.09.2016 / 02:36