+ 2
Please someone should help me out,I'm a beginner
Code, "Stay hungry,stay foolish" by Steve Jobs. Just as it is shown,i have been trying but couldnt get it.
14 Respuestas
+ 3
u can use \"
print("stay hungry,stay foolish\"by Steve Jobs ")
+ 1
print("Stay hungry, stay foolish - by Steve Jobs")
#not capitalize the first letter
+ 1
one more example with the escape character.
print(“\”Stay hungry,stay foolish\” by steve jobs.”)
0
Share your trail so that we can tell your mistakes
0
The above is my trial
0
Oh..still wrong
0
Thank you guys ..
I got it🙏🙏🙏
0
Special Thanks Andrew..🙏🙏
0
Claire Excel you’re welcome. i’m glad i was able to assist. good luck to you on your journey!
0
print("Stay hungry, stay foolish-by Steve Jobs")
we should not capital first letter
- 1
print("Stay hungry,stay foolish" "by Steve Jobs")
- 1
Print("Stay hungry, stay foolish - by Steve Jobs")
- 2
here are some examples for you.
example 1 using single and double quotes.
print(‘“Stay hungry,stay foolish” by steve jobs.’)
example 2 using comma to concatenate two strings.
print(‘“Stay hungry,stay foolish”’, “by steve jobs.”)
example 3 using f-string
string_var=‘“Stay hungry,stay foolish” by steve jobs.’
print(f’{string_var}’)
i hope these help and good luck.
- 2
def align(left, right, width):
print(f"{left}{' '*(width-(len(str(left) + str(right))))} {right}")
left = "Stay hungry, stay foolish"
right = "Steve Jobs"
print(left)
align('', '-'+right, len(left)+8)