Questions tagged as 'if'

1
answer

Replace characters of a string in python using Lists

Good! I try to make my script go through a string and replace each character with another string using lists to be able to change each of the characters in a simpler way, but when going through my list it does not replace them beca...
asked by 27.11.2017 / 02:22
4
answers

I jump directly to the Else

I have to enter two numbers and you have to tell me if they are even or odd. It is half done but I try it and I directly jump the alert of the else, regardless of whether the numbers are even or not. <script type="text/javascript">...
asked by 02.02.2018 / 14:49
2
answers

Print twice "Wrong date". Conditionals in Java

I have to have it print "correct date" when I write a date within the ranges considering months of 28, 30 and 31 days. When I insert by console for example 31/4/1982 (a date that is incorrect because April has 30 days) I print "Wrong date" twice...
asked by 06.12.2017 / 16:53
2
answers

Simple question of! NOT because it does not return what I think

Focusing on this part = > Number (! username) Because it does not return 'Please enter some value. and if it works with ! Number (userName) I do not understand well At all, when I put 0 in the prompt it is a zero string, which is by defa...
asked by 14.12.2017 / 00:17
1
answer

'if' with a boolean that does not act according to the [closed] documentation

I am working against an Active Directory and the server response is a boolean. And always, always, enter the "true" part of the if. I have done debug returns false the validation against the Active Directory has gone well or badly....
asked by 13.09.2018 / 13:22
2
answers

Python, compare two files

I have to read all the files that are inside a directory and then compare them with those of a .txt file import os from os import listdir from os.path import isfile,join mi_path = "c://python27//proyectos//" f = open(mi_path+'datos.txt', 'r+'...
asked by 13.07.2017 / 13:43
1
answer

How to read character data within an if conditional?

My problem is that according to a whole number, for example 1, the conditional would be fulfilled and therefore, I would have to read the data I am requesting, of a character type. When performing this action, at the time of entering the number...
asked by 13.06.2018 / 08:39
1
answer

Hangman game in C

I'm doing a game of Hangman in C and until now I have the count of the letters depending on the word to guess that the user enters, I already have a condition that tells me that if the letter that you enter is equal to any of the positions of th...
asked by 15.08.2018 / 02:48
2
answers

Function MYSQL - IF

Create a function that modifies the sale price of a product based on the quantity in stock: a) If the amount is 300, the price increase will be of a value of 5 * / I am trying to do this exercise and it does not work out in any way. I leave...
asked by 27.12.2017 / 00:39
3
answers

Block control if else

The program executes without problems, but always writes the last statement printf("lo siento, no puedo calcularlo"); Is there any way I can not get out of this condition? #include <stdio.h> #include <conio.h> int main...
asked by 15.09.2017 / 01:55