Respuesta :
Answer:
Check the explanation
Explanation:
#include <stdio.h>
int dice1;
int dice2;
int sum;
int roll_die_twice(int dice1,int dice2){
if(sum==7){
printf("winner");
}
else if (sum==11){
printf("looser");
}
else if (sum!=7 && sum!=11)
{
printf("nor winner or looser");
}
}
int main()
{
roll_die_twice(2,7);
return 0;
}
The code screenshot and code output can be seen in the attached image below.

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)
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