Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f7428d

Browse filesBrowse files
committed
Added twitter exercise
1 parent b98d729 commit 8f7428d
Copy full SHA for 8f7428d

File tree

Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed

‎playtime/lesson01_twitter.py

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Difficulty Level: Beginner
2+
# Exercise: Tweet length calculator
3+
4+
# Part one:
5+
# Create a variable called tweet and put some text in it
6+
# maybe something like "Hear Me Code class was so much fun today!"
7+
8+
# Measure the length of that tweet.
9+
10+
# Was that tweet more than 140 characters?
11+
# If so, tell the user it was too long!
12+
# Was that tweet 140 or fewer characters?
13+
# If so, tell the user how witty they are!
14+
15+
16+
# Part two:
17+
# Adjust the program to say how many characters you have remaining to use, or how many you need to trim by in order to meet the 140 character limit
18+
19+
20+
# Part three:
21+
# Twitter announced they are changing their character limit to 280, but they might change it again.
22+
# Can you make your code flexible enough so that you don't have to replace the character limit in multiple places in your code?
23+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.