Sunday, February 5, 2023

TTurtle

 The travails of Turtle: Still trying for a generic Valentine's message.

                                                                               


import turtle
import random

screen = turtle.Screen()
screen.setup(width=680, height=680)
screen.bgcolor("midnightblue")
image = "Choco.gif"
screen.bgpic(image)
my_t = turtle.Turtle()
my_t.hideturtle()
my_t.speed(1)
col = ["white", "aquamarine", "yellow"]
my_t.pencolor(random.choice(col))
my_x = [-270,-100]
my_y = [200, 225]
my_t.pu()
my_t.setpos(random.choice(my_x), random.choice(my_y))
my_t.pd()
siz = [18, 22, 26]
look = ["bold", "italic", " "]
my_t.write("SWEETS for my Sweetie...", font = ("Times_Nr", random.choice(siz), random.choice(look)))
my_t2 = turtle.Turtle()
my_t2.color('orange', 'khaki')
my_t2.shape('turtle')
my_t2.pensize(3)
my_t2.hideturtle()
my_t2.pu()
my_t2.goto(-250, 300)
my_t2.showturtle()
my_t2.pendown()
my_t2.forward(500)


screen.mainloop()



Saturday, February 4, 2023

Quantum

 Found an awesome vid on quantum physics, this morning. Thought

I would share:


A neat way to get clear about the difference between classical and quantum

physics is to look at two versions  of the (Young's) double slit experiment. 

An an experiment in classical physics at the beginning of the 19th century, 

it demonstrates that light is a wave. As a recent experiment, done with individual

electrons, it shows that the quantum has to cross both slits at once, and interfere

with itself. Clean...

From Wiikpedia: 

                                                                 



Friday, February 3, 2023

SecondR

 Bill C-22 has now passed the House, and made it to second Reading in

the Senate:

                                                                   

       

                                                           *     *     *

                                                                    

Thursday, February 2, 2023

Valentinus

 Allowed myself a day of reading, as I  mull on what my Valentine's Day

turtle project should be. Valentine'sDay is St-Valentine's day in French, and 

harps back to the early Christian martyr of the thrid century whose Feast Day is 

February 14. Interestingly, there was prior to that in Rome a pagan feast at the date, 

where an animal was sacrificed to mark the end of the year. The new year started 

on March1.


Valentinus was a given name for male children in Rome; it means strong and 

valorous. The first historical Valetinus was a gnostic theologian in the second century AD.

There is some confusion about the precise tennets of Gnosticism, but it existed at the

same time as very early Christianity and overlapped with it. From Wikipedia:

                                                                  


https://link.springer.com/chapter/10.1057/9780230616585_5

Traveller

 There were repurcussions: The US Fed raised the Bank rate

by a modest .25 points yesterday, but did indicate it expected

a further such raise down the road. This morning we find that

the Bank of England has raised its rate by .50 to 4%. and that

the Eurozone rate was also up .50 to 3% with an expected further

.50 raise next month.


*     *     *
Where things stand for a Canadian traveller this morning:

                                                      









                                                                               

Wednesday, February 1, 2023

Definitions

 Below, one sees clearly the difference between the class and the base class. Shape

is called from the base class Turtle - super(shape = 'anything')- whereas color is from 

RawTurtle.

from turtle import TurtleScreen, RawTurtle
from tkinter import*
import random

root = Tk()
c1 = Canvas(root, width= 300, height=400)
c1.pack()
screen = TurtleScreen(c1)
screen.bgcolor('sky blue')

def go():
t1.forward(130)

class turtle(RawTurtle):
def _init_(self, color):
super().__init__(shape='shape')
self.TurtleScreen = 'c1'
self.color = color

my_list1 = ['Hello!', 'Bonjour!', 'Guten Tag!', 'Hola!']
message1 = random.choice(my_list1)

my_list2 = ['Good-Bye!','Au revoir!', 'Auf Wiedersehen!', 'Chao!']
message2 = random.choice(my_list2)

t1 =turtle(screen, 'turtle')
t1.color('blue', 'red')
t1.pu()
t1.goto(-20, 30)
t1.pd()
t1.write(message2, font=('Ink_Free', 20, 'bold'))
t1.pu()
t1.backward(50)

screen.onkey(fun=go, key="Up")
screen.listen()
root.mainloop()

screen.exitonclick()

Next, I need to define write(message) as a class method ie on the class and not

on any particular instance of it...

                                                     *     *     *

                                                               


rom turtle import TurtleScreen, RawTurtle
from tkinter import*
import random

root = Tk()
c1 = Canvas(root, width= 300, height=450)
c1.pack()
screen = TurtleScreen(c1)
screen.bgcolor('sky blue')

def go():
t1.forward(130)

class turtle(RawTurtle):
def _init_(self, color,message ):
super().__init__(shape='shape')
self.TurtleScreen = 'c1'
self.color = color
self.message = 'message'
self.f = write(message)


my_list1 = ['Hello!', 'Bonjour!', 'Guten Tag!', 'Hola!']
message1 = random.choice(my_list1)

my_list2 = ['Good-Bye!','Au revoir!', 'Auf Wiedersehen!', 'Chao!']
message2 = random.choice(my_list2)

@classmethod
def write(turtle, message):
turtle.write(message)
turtle.style = ('Ink_Free', 20, 'bold')

t1 =turtle(screen,'turtle')
t1.color('blue', 'red')
t1.pu()
t1.goto(-20, 30)
t1.pd()
t1.write(message1,font='style')
t1.pu()
t1.goto(40,-10)
t1.pd()
t1.write(message2,font ='style')
t1.pu()
t1.backward(150)

screen.onkey(fun=go, key="Up")
screen.listen()
root.mainloop()

screen.exitonclick()

Busy Day

 There should be an annoucement from the US Fedral reserve about

the Bank rate this afternoon. A hike of .25% is expected. This may not

be the last hike for the US in 2023.


                                              *     *     *

Bill C-22 is scheduled for a Third Reading and vote in Canada's House of Commons

this afternoon. The Bill earlier received unanimous approval on Reading Two.

                                                     


          *     *     *
From the Guardian UK:

                                                              

                           

                                                                *     *     *
If the US is bracing for yet another fight in the House about raising the debt ceiling,

European countries are looking to adjusting retirement. In the UK, the retirement age is set to

go up to 67, and then 68 in the coming years as per an act passed in 2007. As for France,

 and considered a 'model' of the genre, the 2010 reform in France under Nicholas Sarkosy 

was technically complex.



https://fr.wikipedia.org/wiki/R%C3%A9forme_des_retraites_en_France_en_2010#:~:text=La%20r%C3%A9forme%20des%20retraites%20en,fran%C3%A7ais%20de%20retraites%20par%20r%C3%A9partition.