Computer Science
Write a program that displays a joke. But display the punchline only when the user presses enter key.
(Hint. You may use input( ))
Python
Python Funda
134 Likes
Answer
print("Why is 6 afraid of 7?")
input("Press Enter")
print("Because 7 8(ate) 9 :-)")
Output
Why is 6 afraid of 7?
Press Enter
Because 7 8(ate) 9 :-)
Answered By
62 Likes
Related Questions
What will the following code result into ?
n1, n2 = 5, 7 n3 = n1 + n2 n4 = n4 + 2 print(n1, n2, n3, n4)
Correct the following program so that it displays 33 when 30 is input.
val = input("Enter a value") nval = val + 30 print(nval)
Write a program to read today's date (only del part) from user. Then display how many days are left in the current month.
Write a program that generates the following output :
5
10
9
Assign value 5 to a variable using assignment operator (=) Multiply it with 2 to generate 10 and subtract 1 to generate 9.