import turtle
import colorsys
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
t.pensize(3)
n = 36
h = 0
for i in range(250):
color = colorsys.hsv_to_rgb(h, 1, 0.8)
t.pencolor(color)
h+= 1/n
t.right(i)
t.circle(55, i)
t.forward(i)
t.left(91)
import colorsys
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
t.pensize(3)
n = 36
h = 0
for i in range(250):
color = colorsys.hsv_to_rgb(h, 1, 0.8)
t.pencolor(color)
h+= 1/n
t.right(i)
t.circle(55, i)
t.forward(i)
t.left(91)
π1
import turtle
import colorsys
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
def d(x,y):
t.up()
t.goto(x,y)
t.down()
d(-30,30)
a = 22
for i in range(180):
for i in range(i):
t.pencolor('red')
t.rt(6)
t.circle(a)
a = a+0.5
turtle.done()
import colorsys
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
def d(x,y):
t.up()
t.goto(x,y)
t.down()
d(-30,30)
a = 22
for i in range(180):
for i in range(i):
t.pencolor('red')
t.rt(6)
t.circle(a)
a = a+0.5
turtle.done()
https://instagram.com/learning_code_?utm_medium=copy_link
Follow me on instagram
Follow me on instagram
import turtle
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
for i in range(290):
t.pencolor('red')
t.circle(-i+1, 200)
t.rt(80)
turtle.done()
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(0)
for i in range(290):
t.pencolor('red')
t.circle(-i+1, 200)
t.rt(80)
turtle.done()
π1
>>> list1 = [11, 2, 23]
>>> list2 = [2, 11, 23]
>>> print(list1 == list2)
>>> list2 = [2, 11, 23]
>>> print(list1 == list2)
Anonymous Quiz
55%
false
25%
true
15%
error
5%
none of the above
Python Learning ...
https://youtu.be/gRm495egdI0
Source Code
import turtle as t
t. speed(0)
t.bgcolor('black')
t.pencolor('yellow')
for i in range(150):
t.right(i)
t.circle(125, i)
t.forward(i)
t.right(90)
t.done()
import turtle as t
t. speed(0)
t.bgcolor('black')
t.pencolor('yellow')
for i in range(150):
t.right(i)
t.circle(125, i)
t.forward(i)
t.right(90)
t.done()
What is the maximum possible length of an identifier in Python?
Anonymous Quiz
20%
33 character
28%
98 character
14%
29 character
38%
Unlimited
Which of the following is the correct extension of the Python file?
Anonymous Quiz
11%
a) .python
8%
b) .pl
77%
c) .py
3%
d) .p
π1
Units of Computer. Memory Measurement
1 bit = Binary digit
8 bits 1 Byte
1024 byte = 1 kilo byte
1024 KB = 1 Mega byte
1024 MB = 1 Giga byte
1024 GB = 1 Tera byte
1024 TB = 1 Peta byte
1024 PB = 1 Exa byte
1024 EB = 1 Zetta byte
1024 ZB = 1 Yotta byte
1024 YB = 1 Bronto byte
1024 BB = 1 Geop byte
1 bit = Binary digit
8 bits 1 Byte
1024 byte = 1 kilo byte
1024 KB = 1 Mega byte
1024 MB = 1 Giga byte
1024 GB = 1 Tera byte
1024 TB = 1 Peta byte
1024 PB = 1 Exa byte
1024 EB = 1 Zetta byte
1024 ZB = 1 Yotta byte
1024 YB = 1 Bronto byte
1024 BB = 1 Geop byte
What will be the output of the following code snippet? π§ π₯π€
- example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; - print(example[-3:-1])
- example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; - print(example[-3:-1])
Anonymous Quiz
39%
['Monday', 'Tuesday']
18%
['Sunday', 'Monday']
21%
['Tuesday', 'wednesday']
23%
['Monday', 'Wednesday']
π2π₯1
Which of the following statements is valid for "if statement"?π§ π₯π€
Anonymous Quiz
52%
if f<=12:
28%
if (f<=12)
9%
if (f>=122)
11%
if f>=12