write a program in Python language that displays a joke . but display the punchline only when the user press enter key. (hint:- u may use input())
Answers
The program that will display the joke on providing an input will be as per the following –
print('What do you get when you cross a snowman with a vampire?')
input()
print('Frostbite!')
print()
print('What do dentists call an astronaut\'s cavity?')
input()
print('A black hole!')
print()
print('Knock knock.')
input()
print(""Who's there?"")
input()
print('Interrupting cow.')
input()
print('Interrupting cow wh', end='')
print('-MOO!')
a = input("press enter to read a joke :")
print(" ")
print("why sunday is stronger than monday")
print(" ")
b = input("any guess :")
if b == "no":
print(".")
print(".")
print(".")
print(".")
print("because it,s a week day")
else:
if b == "yes":
print(" ")
c = input("enter your guess :")
if c == "because it,s a week day":
print("correct guess")
print("you won !")
else:
print("incorrect guess")
else:
print("invalid value entered , enter only yes or no")
this is in advanced form.......once you understand it is very easy
you will have to read every line and understand it
note :- you can remove that print(" ") thing which is present in between the codes it put it there sto have a nice output look