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 Answershow can i put a program in an application ? i wrote a program with eclipse ( a calculator ) what can i do with it now ? maybe put it in an application but how ?
and is in this app (sololearn) declared how to program interactive fields ? like for calculator a field for + - * / and = ? is there any tutorial for that ?
2 Votes
5 Answershow do I get line breaks?
name = input("What is your name?:")
print("Hiya, " + name)
age = int(input("Tell me your age:"))
year = str((2016 - age) + 100)
num = int(input("Enter a number between 1 and 50:"))
line = str((name + " will be 100 in the year " + year) * num)
print(\n line)
2 Votes
3 AnswersHow can I read from a file this line
19 34 Gateway Arch - St. Louis, MO.
The first digit is age, second timeUsed, and the rest description. So I want to read them and store them in a variable.
The code insime my while loop of my File is int age = reader.nextInt();
Int Tused = reader.nextInt();
Description = reader.next()
0 Votes
4 Answerscan someone tell me how to make it impossible for a user to type a 'userchoice1[x]' value that does not range from 1 - 10.
If you also know a way I can make the user input another value for the 'userchoice1[x]' variable if it is less than 1, I'll appreciate you share the knowledge with me.
please see the short code below
1 Vote
2 AnswersHot today
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