Skip to content

Instantly share code, notes, and snippets.

@calthoff
Created September 16, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calthoff/50153a14c4d31fe175697060ca47e3af to your computer and use it in GitHub Desktop.
Save calthoff/50153a14c4d31fe175697060ca47e3af to your computer and use it in GitHub Desktop.
#exercise 1
print("It was a bright cold day in April, and the clocks were striking thirteen."[:33])
#exercise 2
print(""" "Hi" """)
#exercise 3
print('A screaming comes across the sky.'.replace('s', '$'))
#exercise 4
print("Hemingway".index('m'))
@intechjakob
Copy link

Completing the third exercise can be quite tricky. one will need to write 'across' with only one 's'.

@Gaiatuven
Copy link

the code never runs with across spelled with 2 s at the end.
reading @Yakupgenim you have to exclude the one s from (across): in order for it to pass.

print('A screaming comes acros the sky.'.replace('s', '$'))

@HAKIDES
Copy link

HAKIDES commented Jun 9, 2023

replaceit = "A screaming comes acros the sky."
replaceit = replaceit.replace('s', '$')
print(replaceit)

oh my thats why ok thanks and this was my answer

@Cuteali98
Copy link

Exercise#3 is not correct and need to check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment