Page 129 -
P. 129
the message stays the same
The function always sends the
same message
price_now = input("Do you want to see the price now (Y/N)? ")
if price_now == "Y":
print(get_price()) send_to_twitter()
Call the “send_to_twitter()"
Replace the else: function instead.
price = 99.99
calls to while price > 4.74:
“print()". time.sleep(900)
price = get_price()
print("Buy!") send_to_twitter()
The Starbuzz
CEO's homepage
on Twitter.
No matter which option is chosen by the user, the
“send_to_twitter()" function sends the same tweet to
Twitter.
94 Chapter 3