Answer:
def roll_die_twice(num1, num2):
if num1 + num2 == 7:
print("You won")
elif num1 + num2 == 11:
print("You lost")
elif (num1 + num2 != 7) or (num1 + num2 != 11):
print("No winner or loser")
n1 = int(input("Roll the dice: "))
n2 = int(input("Roll the dice again: "))
roll_die_twice(n1, n2)
Step-by-step explanation:
Create a function called roll_die_twice that takes two parameter, num1 and num2
Inside function, check the sum of the two numbers. If sum is equal to 7, print "You won". If sum is equal to 11, print "You lost". If sum is neither 7 nor 11, print "No winner or loser".
Get the numbers from the user
Call the function with given numbers