Complete 2. challenge

This commit is contained in:
2025-09-12 10:03:28 +02:00
parent 7e51d2ac24
commit 222c916b3d
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Class {
#name : #Challenge0,
#superclass : #Object,
#instVars : [
'response'
],
#category : #MyCounter
}
{ #category : #actions }
Challenge0 >> fetch [
response := ZnEasy getPng: 'http://pharo.org/files/pharo.png'.
]
{ #category : #actions }
Challenge0 >> open [
response asMorph openInWorld
]

View File

@@ -0,0 +1,22 @@
Class {
#name : #Challenge1,
#superclass : #Object,
#instVars : [
'response'
],
#category : #MyCounter
}
{ #category : #actions }
Challenge1 >> fetch [
|email url asHex|
email := MD5 new hashMessage: 'belka@caraus.de'.
asHex := email hex asString.
url := 'http://www.gravatar.com/avatar/', asHex, '.jpg'.
response := ZnEasy getJpeg: url
]
{ #category : #actions }
Challenge1 >> open [
response asMorph openInHand
]