+ 1

How can i creat program with two input

I want to create a program in which user have to enter a valu if that is integer than it say nice job but if it not then it say you have 2 life left try again and it continues until user input integer or his live down to 0.....

15th Sep 2018, 2:38 PM
The Cronous
The Cronous - avatar
4 Antworten
+ 4
""" The Cronous Python Code """ inp = input() life = 3 try: val = int(inp) print("Correct! Input is an Integer") life+=1 print(life) except ValueError: life-=1 print(life) print("Not Integer")
15th Sep 2018, 3:50 PM
Femi
Femi - avatar
+ 5
Which Language do you want to make this program?
15th Sep 2018, 3:32 PM
Femi
Femi - avatar
+ 3
thanks buddy
15th Sep 2018, 3:53 PM
The Cronous
The Cronous - avatar
+ 2
oh sorry , python
15th Sep 2018, 3:38 PM
The Cronous
The Cronous - avatar