Python Turtle, the clearstamp(face_up_lis) not working for some reason. please help
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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F10732faa-f9b7-4c12-81f1-19b5d255f419%2Fd2df55a6-07db-491f-8f31-002dcd6907f1%2Fpppf428_processed.png&w=3840&q=75)
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()](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F10732faa-f9b7-4c12-81f1-19b5d255f419%2Fd2df55a6-07db-491f-8f31-002dcd6907f1%2F6g18alc_processed.png&w=3840&q=75)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education