My second Notebook

A commented group reading of selected parts of “An Elementary Introduction to the Wolfram Language”
by Stephen Wolfram

Yves Papegay - yap@informathiques.fr

This notebook is the support created during the second session of the course “Online teacher training and community of practices - Digital tools for STEAM education and Makers pedagogy, November 2024 - June 2025” , an activity of the “MEJ MAKERS ERASMUS+ project (2023-2-FR01-KA210-SCH-000176068)” - visit the course dedicated web page for details.

Images (10)

img1=CurrentImage[]

image=

ColorNegate[image]

ColorNegate[]

Blur[,50]

Manipulate[Blur[,p],{p,2,40,1}]

DominantColors[]

DominantColors[]

Binarize[]

EdgeDetect[]

ImageAdd[Blur[,10],EdgeDetect[]]

ImageRestyle[,]

Strings and text (11)

str="How are you today ?"

StringLength["How are you today ?"]

StringReverse["How are you today ?"]

ToUpperCase["How are you today ?"]

StringJoin["Hello"," ","How are you today ?"]

Characters["Hello How are you today ?"]

Sort[Characters["Hello How are you today ?"]]

text="This long-term practical course will focus on the tools that are interesting to implement STEAM education, and will address the way to practically realize the activities of experimentation, analysis, understanding, modeling, simulation, and spreading.
It will include learning a symbolic programming language, implementation of methods of numerical computation, use of computer-based simulation and visualization, and geometrical computation.
After introduction sessions, this course will be project-based, with practical tasks to be done by attendees on a voluntary basis, and presenters will act essentially as coaches and tutors.";

TextWords[text]

StringLength[TextWords[text]]

StringTake[WikipediaData["Computers"],1000]

Table[WordCloud[StringTake[WikipediaData["Computers"],p]],{p,1000,10000,1000}]

Transliterate["MejMakers","Russian"]

EdgeDetect[Rasterize[Style["МейМакерс",50,Bold]]]

Sounds (12)

Sound[SoundNote["C"]]

Sound[Table[SoundNote[RandomInteger[12],0.2,"Violin"],20]]

Real-World Data (16)

Entities

FullForm[(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"])]

(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"])

Properties

(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"])["Flag"]

ColorNegate[(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"])["Flag"]]

EntityValue[(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"])["BorderingCountries"],"Flag"]

(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"])["Polygon"]

GeoGraphics[Polygon[GeoPosition[]]]

(EntityClass["planets", EntityClass["Planet",All], "EntityClass[\"Planet\", All]", "planets"])

EntityList[(EntityClass["planets", EntityClass["Planet",All], "EntityClass[\"Planet\", All]", "planets"])]

EntityValue[EntityList[(EntityClass["planets", EntityClass["Planet",All], "EntityClass[\"Planet\", All]", "planets"])],"Image"]

EntityValue[EntityList[(EntityClass["planets", EntityClass["Planet",All], "EntityClass[\"Planet\", All]", "planets"])],"Radius"]

UnitConvert[(Entity["Eiffel Tower", Entity["Building","EiffelTower::5h9w8"], "Entity[\"Building\", \"EiffelTower::5h9w8\"]", "building"])["Height"],"Feet"]

(Entity["Eiffel Tower", Entity["Building","EiffelTower::5h9w8"], "Entity[\"Building\", \"EiffelTower::5h9w8\"]", "building"])["Image"]

Entity["Artwork","TheStarryNight::VincentVanGogh"]["Image"]

ImageRestyle[,]

(Entity["caffeine", Entity["Chemical","Caffeine"], "Entity[\"Chemical\", \"Caffeine\"]", "chemical"])["MoleculePlot"]

(Entity["skull", Entity["AnatomicalStructure","Skull"], "Entity[\"AnatomicalStructure\", \"Skull\"]", "anatomical structure"])["Graphics3D"]

EntityValue[RandomEntity["Movie",5],"Image"]

Geocomputation (18)

GeoDistance[(Entity["Pertuis", Entity["City",{"Pertuis","ProvenceAlpesCoteDAzur","France"}], "Entity[\"City\", {\"Pertuis\", \"ProvenceAlpesCoteDAzur\", \"France\"}]", "city"]),(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"])]

GeoListPlot[{(Entity["France", Entity["Country","France"], "Entity[\"Country\", \"France\"]", "country"]),(Entity["Romania", Entity["Country","Romania"], "Entity[\"Country\", \"Romania\"]", "country"]),(Entity["Pertuis", Entity["City",{"Pertuis","ProvenceAlpesCoteDAzur","France"}], "Entity[\"City\", {\"Pertuis\", \"ProvenceAlpesCoteDAzur\", \"France\"}]", "city"]),(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"])}]

GeoGraphics[GeoPath[{(Entity["Pertuis", Entity["City",{"Pertuis","ProvenceAlpesCoteDAzur","France"}], "Entity[\"City\", {\"Pertuis\", \"ProvenceAlpesCoteDAzur\", \"France\"}]", "city"]),(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"])}]]

GeoGraphics[GeoDisk[(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"]),(Quantity[2, "km", kilometers, "Kilometers"])]]

GeoImage[GeoDisk[(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"]),(Quantity[2, "km", kilometers, "Kilometers"])]]

GeoListPlot[GeoNearest["Volcano",Here,10]]

Dates (19)

Now

Now+(Quantity[1, "wk", week, "Weeks"])

Now -(DateObject["Sun 3 Nov 2024", DateObject[{2024,11,3},"Day"]])

MoonPhase[Now,"Icon"]

Now-Sunset[Here,Today]

Now-Sunset[(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"]),Today]

(Entity["Cluj\[Hyphen]Napoca", Entity["City",{"ClujNapoca","Cluj","Romania"}], "Entity[\"City\", {\"ClujNapoca\", \"Cluj\", \"Romania\"}]", "city"])

Options (20)

ListLinePlot[RandomInteger[10,20]]

ListLinePlot[RandomInteger[10,20],PlotTheme->"Marketing"]

ListLinePlot[RandomInteger[10,20],PlotTheme->"Business"]

ListLinePlot[RandomInteger[10,20],PlotTheme->"Web",Filling->Axis,Background->LightBlue]

GeoListPlot[Entity["Country","France"]]

GeoListPlot[Entity["Country","France"],GeoRange->EntityClass["Country","Europe"],GeoBackground->"ReliefMap"]

Functions (25-26)

Ways to Apply Functions

ColorNegate[img1]

ColorNegate@img1

f@x

f@g@h@x

EdgeDetect@ColorNegate@

x//f

x//f//g//h

//ColorNegate//EdgeDetect

2 Pi^3+1//N

N@2 Pi^3+1

f@{a,b,c}

f/@{a,b,c}

Framed[x]

Framed@{x,y,z}

Framed/@{x,y,z}

Hue/@(0.1Range[6])

{Hue[0.1],Hue[0.2],Hue[0.3],Hue[0.4],Hue[0.5],Hue[0.6]}

(0.1Range[6])

N[{1/2,1/3,1/4,1/5}]

Graphics[{Circle[],RegularPolygon[7],Style[RegularPolygon[3],Orange]}]

Graphics/@{Circle[],RegularPolygon[7],Style[RegularPolygon[3],Orange]}

Map[Graphics,{Circle[],RegularPolygon[7],Style[RegularPolygon[3],Orange]}]