Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.07 KB

File metadata and controls

29 lines (15 loc) · 1.07 KB

Unit 3 Practice

Exercise 3

You've got a very important message to get out to all your followers on Twitter. Unfortunately, Twitter only allows 280 characters per Tweet. Your message is over 1,000 characters long and you're wondering how many Tweets it will take to get your whole message out.

3.1

Calculate the number of Tweets required, rounding up to the nearest integer.

3.2

Ask the user for the number of characters in their message

  • if the length of the message is less than the max_length allowed for a Tweet, output a message telling the user they only need one Tweet

  • Otherwise, calculate the number of Tweets required, rounding up to the nearest integer and output a message telling the user the number of Tweets they will need.

3.3

Display different messages to the user depending on how many Tweets their message requires.

Exercise 3 solution