

Проєкт
Presentation
•
Science
•
8th Grade
•
Practice Problem
•
Hard
ЦПРПП КМР
FREE Resource
9 Slides • 0 Questions
1
2
Сьогодні ми створимо невеличку гру “Впіймай кульку”, в якій на пол буде рандомно з’являтись кольорова кулька, а гравець намагатиметься клікнути по ній мишкою. Якщо гравець встигне це зробити, йому буде нараховано бал.
3
4
АЛГОРИТМ ВИКОНАННЯ РОБОТИ
Крок 1. Створюємо вікно з двома полями canvas:
біле – ігрове, для пjяви кульок;
поморанчеве – для виводу кількості балів.
5
from tkinter import*
import random
Tk = Tk()
Tk.title("Впіймати кульку")
c=Canvas (Tk, width=600, height=600, bg='white')
c.pack()
p=Canvas (Tk, width=600, height=100, bg='orange')
p.pack()
Tk.mainloop()
6
Крок 2. Створємо масив кольорів, які змінюватиме кулька (можете зробити більшу кількість кольорів)
7
Крок 3. Створюємо змінну, що рахуватиме кількість влучень та встановлюємо для неї значення нуль.
8
Крок 4. Створюємо функцію, яка промальовуватиме кульки в рандомній точці. Також прописуємо в ній можливість клікнути по колу лівою кнопкою миші.
9
from tkinter import*
import random
Tk = Tk()
Tk.title("Впіймати кульку")
c=Canvas (Tk, width=600, height=600, bg='white')
c.pack()
p=Canvas (Tk, width=600, height=100, bg='orange')
p.pack()
Tk.mainloop()
Show answer
Auto Play
Slide 1 / 9
SLIDE
Similar Resources on Wayground
9 questions
Bangun Ruang Sisi Datar
Presentation
•
8th Grade
9 questions
Social Studies
Presentation
•
8th Grade
9 questions
The Early People of Texas
Presentation
•
7th Grade
6 questions
TK KARTIKA
Presentation
•
KG
8 questions
Estuary Biome
Presentation
•
7th Grade
7 questions
Belum Berjudulmodul ajar
Presentation
•
KG
8 questions
ELA
Presentation
•
8th Grade
6 questions
Tuesday November 10 Virtual
Presentation
•
7th - 8th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Science
20 questions
Newton's Laws of Motion
Quiz
•
8th Grade
15 questions
potential and kinetic energy
Quiz
•
8th Grade
21 questions
Newton's Laws of Motion
Quiz
•
8th Grade
20 questions
Elements, Compounds and Mixtures
Quiz
•
8th Grade
10 questions
Exploring Chemical and Physical Changes
Interactive video
•
6th - 10th Grade
20 questions
Physical vs Chemical Changes
Quiz
•
8th Grade
20 questions
Conduction, convection, and Radiation Practice
Quiz
•
8th Grade
21 questions
Waves and Wave Properties
Quiz
•
6th - 8th Grade