Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Experience the convenience of getting accurate answers to your questions from a dedicated community of professionals. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Write code that sets the value of the variable num_cards to seven if its current value is less than seven. otherwise, don't change the value. assume that num_cards already has an initial value.

Sagot :

The program to illustrate the information is given below.

How to express the code?

num_cards = 5 #Assuming value of num_cards is 5 (You can take any value you want)

if num_cards<7 :

num_cards=7

print(num_cards)

def dice_eval(x,y):

if (x+y== 7)|(x+y== 11) :

return "Winner!"

elif (x+y== 2)|(x+y== 3)|(x+y== 12) :

else:

a = x+y

if a<10:

return "Point is 0"+ str(a)

else :

return "Point is " + str(a)

Example -

dice_eval(0,8) returns 'Point is 08'

Learn more about programs on:

https://brainly.com/question/26642771

#SPJ1

Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. We're glad you visited Westonci.ca. Return anytime for updated answers from our knowledgeable team.