Question: Check the errors on this code and add 9 if statments to the main function? Main function: main ( ) ( must call ALL helper

Check the errors on this code and add 9 if statments to the main function?
Main function: main ()(must call ALL helper functions except draw_symbols)
main():
The main function must call rank_input () and suit_input () to obtain respective inputs from the user and call draw_top, draw_mid, and draw_bot appropriately to draw the correct playing card using the information given. This function should not have any print statements at all.
Here is my code
def draw_top(rank):
print (""+7*"_")
print("l" rank)+6**+"|")
def suit_input():
suit = input( "Enter suit (C,D,H,S): ")
while( suit!="C" or suitl="D" or suit l="H" or suit "S"):
if suit ="C":
return "Ju2663"
elif suit ="D":
return "\u2666"
elif suit ="H":
return "\u2665"
elif suit ="S":
return "Vu2660"
else:
suit = input (" Invalid - try again: ")
return suit
def rank_input():
rank =(input(" Enter card rank (A -9): "))
while (int(rank)>0 and int(rank)10):
rank = int(rank)
If rank ==1 :
return "A"
Elif rank ==9:
return str(rank)
Else:
return str(rank)
rank = input("->Invalid - try again ")
def draw_mid(num_outer, num_mid, symbol):
draw_symbols ( num_outer, symbol )
draw_symbols( num_mid, symbol)
draw_symbols( num_outer, symbol )
def draw_botO:
print ("I"+6*""+ rank +"")
print ("I"+6*"++ rank +"")
print (""+7*"-")
def main():
rank = rank_input ()
suit = suit_input ()
if rank in '1aA':
draw_mid()
 Check the errors on this code and add 9 if statments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!