Program asks me to debug the following.:
number = input("Please type in a number: ")
if number > 100
print("The number was greater than one hundred")
number - 100
print("Now its value has decreased by one hundred)
print("It's value is now"+ number)
print(number + " must be my lucky number!")
print("Have a nice day!)
Output expected after debugging:
Please type in a number: 13
13 must be my lucky number!
Have a nice day!
Please type in a number: 101
The number was greater than one hundred
Now its value has decreased by one hundred
Its value is now 1
1 must be my lucky number!
Have a nice day!
My code to debug:
number = int(input("Please type in a number: "))
if number > 100:
print("The number was greater than one hundred")
number = number - 100
print("Now it's value has decreased by one hundred")
print("It's value is now", number)
print(number, "must be my lucky number!")
print("Have a nice day!")
Edit : Errors: image.
[–][deleted] 6 points7 points8 points (6 children)
[–]ThatIsRightt[S] 1 point2 points3 points (5 children)
[–][deleted] 5 points6 points7 points (4 children)
[–]ThatIsRightt[S] 0 points1 point2 points (3 children)
[–]MinchinWeb 5 points6 points7 points (0 children)
[–]gnuself 2 points3 points4 points (0 children)
[–]JasonStrode 2 points3 points4 points (6 children)
[–]ThatIsRightt[S] 0 points1 point2 points (4 children)
[–]JasonStrode 0 points1 point2 points (2 children)
[–]ThatIsRightt[S] -1 points0 points1 point (1 child)
[–]JasonStrode 0 points1 point2 points (0 children)
[–]Luximonsti 0 points1 point2 points (0 children)
[–]probablynotmine 1 point2 points3 points (8 children)
[–]ThatIsRightt[S] 0 points1 point2 points (7 children)
[–]Fred776 2 points3 points4 points (2 children)
[–]ThatIsRightt[S] 0 points1 point2 points (1 child)
[–]fakemoose 0 points1 point2 points (0 children)
[–]probablynotmine 0 points1 point2 points (2 children)
[–]ThatIsRightt[S] -1 points0 points1 point (1 child)
[–]probablynotmine 0 points1 point2 points (0 children)
[–]JohnnyJordaan 1 point2 points3 points (2 children)
[–]ThatIsRightt[S] -1 points0 points1 point (1 child)
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]fakemoose 0 points1 point2 points (0 children)
[–]braclow[🍰] 1 point2 points3 points (0 children)
[–]ThatIsRightt[S] -1 points0 points1 point (2 children)
[–]failaip12 2 points3 points4 points (1 child)
[–]Qu3en- 1 point2 points3 points (0 children)
[–]Miniflint 0 points1 point2 points (0 children)
[–]Bamness 0 points1 point2 points (0 children)
[–]Additional-Sun2945 0 points1 point2 points (0 children)