Python Turtle, the clearstamp(face_up_lis) not working for some reason. please help

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Python Turtle, the clearstamp(face_up_lis) not working for some reason. please help

124
125 face_up_lis=[]
126
127 def check_for_match(card):
128
if len(face_up_lis)==0:
face_up_lis.append(card)
print("1st choice: " + face_up_lis[0].face_up()
t.clearstamp(face_up_lis)
129
130
131
132
133
else:
print("2nd choice: " + face_up_lis[0].face_up())
if face_up_lis [0] =
#t.hideturtle()
134
135
card:
136
print("they equal")
t.clearstamp(face_up_lis)
#t.clearstamp(face_up_lis)
137
138
139
140
else:
#flipping back
place_card(face_up_lis[0].x,face_up_lis[0].y,face_up_lis[0].card_flip())
place_card(card.x,card.y,card.card_flip0)
print("not equal, clearing list")
141
142
143
144
145
146
147
face_up_lis.clear()
148
for acard in face_up_lis:
149
print(acard.face_up())
150
Transcribed Image Text:124 125 face_up_lis=[] 126 127 def check_for_match(card): 128 if len(face_up_lis)==0: face_up_lis.append(card) print("1st choice: " + face_up_lis[0].face_up() t.clearstamp(face_up_lis) 129 130 131 132 133 else: print("2nd choice: " + face_up_lis[0].face_up()) if face_up_lis [0] = #t.hideturtle() 134 135 card: 136 print("they equal") t.clearstamp(face_up_lis) #t.clearstamp(face_up_lis) 137 138 139 140 else: #flipping back place_card(face_up_lis[0].x,face_up_lis[0].y,face_up_lis[0].card_flip()) place_card(card.x,card.y,card.card_flip0) print("not equal, clearing list") 141 142 143 144 145 146 147 face_up_lis.clear() 148 for acard in face_up_lis: 149 print(acard.face_up()) 150
139
#t.clearstamp(face_up_lis)
140
else:
141
142
143
144
#flipping back
place_card(face_up_lis[0].x,face_up_lis[0].y,face_up_lis[0].card_flip())
place_card(card.x,card.y,card.card_flip())
print("not equal, clearing list")
145
146
face_up_lis.clear()
147
for acard in face_up_lis:
print(acard.face_up())
148
149
150
151
152
153 def place_card(x,y,card):
154
155
t.shape(card)
156
t.penup) #up()
157
t.goto(x,y)
158
t.stamp()
Transcribed Image Text:139 #t.clearstamp(face_up_lis) 140 else: 141 142 143 144 #flipping back place_card(face_up_lis[0].x,face_up_lis[0].y,face_up_lis[0].card_flip()) place_card(card.x,card.y,card.card_flip()) print("not equal, clearing list") 145 146 face_up_lis.clear() 147 for acard in face_up_lis: print(acard.face_up()) 148 149 150 151 152 153 def place_card(x,y,card): 154 155 t.shape(card) 156 t.penup) #up() 157 t.goto(x,y) 158 t.stamp()
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Avoiding deadlock
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education