Q&A Discussions
how 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 AnswersWhy does 24 % 7 = 4?
0 Votes
2 AnswersWhy we use = after < ?
0 Votes
2 Answerscan someone help..
what does this code means so it could have the output like on the example..
class SpecialString:
def __init__(self, cont):
self.cont = cont
def __gt__(self, other):
for index in range(len(other.cont)+1):
result = other.cont[:index] + ">" + self.cont
result += ">" + other.cont[index:]
print(result)
spam = SpecialString("spam")
eggs = SpecialString("eggs")
spam > eggs
1 Vote
5 AnswersHow is the out put of n = 3
0 Votes
2 AnswersHot today
PHP Tutorial Idea
1 Votes
Gimme some advice
0 Votes
Php?
0 Votes
Doubt in C
0 Votes
Modal dialog to modeless dialog
0 Votes
how to create my own html page
0 Votes