Questions tagged as 'while'

1
answer

Success Juggler in Python

I have to create a program that asks the user for natural numbers or 0 to finish and for each number that the user enters, the program must create a juggling sequence and display them on the screen. In turn, when the program ends, you...
asked by 29.11.2018 / 15:43
2
answers

Crash cycle?

I have a problem with a while cycle. I want my program to only accept 4-digit numbers, and, if the user enters one that is out of range, it will miss error. I had done this, but I noticed that from a certain number of figures, the program end...
asked by 26.02.2018 / 07:47
2
answers

strcmp gives unexpected results

I was practicing a bit of c to refresh my memory and there are some lines that are not working for me: int main(){ char nombre[20]; int cont = 3; printf("Ingresa tu nombre de usuario\n"); fgets(nombre,20,stdin); fflush(st...
asked by 09.10.2018 / 17:57
1
answer

Does not allow a pause to be executed within a loop

I'm trying to create a clock from nested while loops but I have not managed it so far <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>reloj</title> </head> <body>...
asked by 12.08.2017 / 06:10
1
answer

I have two WHILE loops and the second one skips

I am trying to make a program for which I need to store different values in two vectors. To read the values I use two equal WHILE loops, but the one from the second vector is skipped. What happens? The final goal is to see if one vector is a...
asked by 12.09.2018 / 10:12
1
answer

I need you to give me 2 different letters

I'm trying to make a poker game to play. The problem is that at the time of telling him that he is giving me two cards from the deck, he gives me only one card twice. For example, you give me Q of heart and Q of heart or...
asked by 29.09.2017 / 06:14
1
answer

problem in condition while "assignment operators"

Hello, I have a problem that I do not understand when using assignment operators the exercise is about printing a sum from 50 + 48 + 46 + 44 ... 20 n=50 h=0 #que hace esta variable? while n<=20: h+=n #no entiendo lo que hace esto n...
asked by 22.05.2018 / 17:58
1
answer

a while inside an html table

Good morning companions (here it's just 10am), to see if they can help me, because I do not know why the code does not work and I explain the code in a table I have "X" name let's say brands when I click on the brand, you must show me all the pr...
asked by 11.05.2018 / 18:11
1
answer

Doubt in an exercise with While condition

Hi, I've been doing exercises with the While condition, but I still have trouble understanding how the exercise works. It consists of entering 10 notes and saying the notes over 7 and under, I have guided myself with other exercises and I have m...
asked by 22.04.2018 / 15:00
3
answers

Operators + = and / = with while in Python

I am starting to study Python through an online course. Although I have worked in R for a couple of years, and in general, I think the programming has many similar bases, there are notable differences. One of the most obvious ones I have...
asked by 23.08.2017 / 20:49