Skip to content

Instantly share code, notes, and snippets.

@calthoff
Created September 16, 2020 20:22
Show Gist options
  • 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'))
@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

@aetrono
Copy link

aetrono commented Jun 16, 2024

Exercise 3 needs to be checked. The IDE is falsely flagging a correct solution, including the one proposed here, because the word "across" in the solution is missing an "s".

image

image

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