Q&A Discussões
Python 3
0 Voto
1 RespostaAverage Score
0 Voto
1 RespostaI have 10 variables called, int1, int2, int 3 and so on. The user can write one number into the console. If the user types 7, I want to add 3 to the value of int7. how do I do this without 10 if statements? can I somehow do something like, (int + "userinput") += 3?
thank you for your help! :D
0 Voto
2 Respostasusing a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.
0 Voto
1 RespostaHey guys im trying to male a simple login use variables and inputs. Can i have some help with my code! A syntax error keeps coming up where i state
x = v.
print 'Hello User'
x = 'Tanner'
v = input('ENTER YOUR NAME HERE')
if x = v
print ('\n Welcome Tanner!')
else x != v
print ('\n User Not Found!!')
0 Voto
9 RespostasI typed out the 1st java ExampleProgram exactly according to the instructions, but Command Prompt keeps saying 'error: cannot find symbol System.out.PrintIn(''Hello World");'
Also, my command prompt directly opens the in the User menu, by default (C:\Users\...).
I need help urgently. What do I do???
1 Voto
4 RespostasIn the short code below, I declared an array of five elements. But I'm getting confused on how to use it in a while loop. My main question is , if the user inputs a userchoice1 value that is less than 1, I want the code to keep looping until the user inputs a number that is not less than 1. But I don't know if the 7th line (userchoice1 [x]++) shows the right way to loop it.
1 Voto
2 RespostasQuente hoje
Sticky position
3 Votes
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes