Jump to content

User contributions for Rob

A user with 400 edits. Account created on 13 March 2024.
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

9 April 2024

5 April 2024

4 April 2024

  • 16:5916:59, 4 April 2024 diff hist +772 N Functions and Modules Created page with " <syntaxhighlight lang="python" line> def make_shirt(size = "L", slogan = "I love Python"): # two params both with default values """Generate a T-shirt order with size and slogan """ # for documentation of function purpose print(f"\nYou ordered a T-shirt saying '{slogan}' in size {size}.\n") make_shirt() # call with defaults make_shirt("M")..."
  • 16:4516:45, 4 April 2024 diff hist +16 Python No edit summary

3 April 2024

  • 17:5217:52, 3 April 2024 diff hist +1,078 Loops No edit summary
  • 15:4515:45, 3 April 2024 diff hist +593 N Loops Created page with "== while Loops == <syntaxhighlight lang="python" line> my_number = 1 while my_number <= 10: print(my_number) my_number += 1 </syntaxhighlight> <syntaxhighlight lang="python" line> prompt = "Enter any message to share. prompt+= "\nPress q to quit" entry = "" while entry != 'q': entry = input(prompt) print("You quit the program") </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighli..."
  • 15:2115:21, 3 April 2024 diff hist +12 Python No edit summary
  • 15:1915:19, 3 April 2024 diff hist +74 Lists and Dictionaries No edit summary
  • 15:0915:09, 3 April 2024 diff hist +247 Strings and Numbers No edit summary
  • 15:0015:00, 3 April 2024 diff hist +1,627 N Strings and Numbers Created page with "== Strings == <syntaxhighlight lang="python" line> my_empty_string = "" my_string = "Hello" print(my_string) </syntaxhighlight> Set string to title, lower, or uppercase <syntaxhighlight lang="python" line> full_name = "bob smith" print(full_name.title()) # also .lower(), .upper() </syntaxhighlight> Remove whitespace or text from beginning or end <syntaxhighlight lang="python" line> my_spacey_string = " Hello " print(my_spacey_string.strip()) # also .lstrip() and .str..."
  • 14:2314:23, 3 April 2024 diff hist +477 N User Input Created page with "== Using input() == <syntaxhighlight lang="python" line> secret = input("Tell me a secret. I promise I won't repeat it: ") print(f"Your secret was '{secret}'. Oops, sorry!") </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight> <syntaxhighlight lang="python" line> </syntaxhighlight>"
  • 14:1514:15, 3 April 2024 diff hist +17 Python No edit summary
  • 14:1314:13, 3 April 2024 diff hist +559 Lists and Dictionaries No edit summary

2 April 2024

1 April 2024

31 March 2024

(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)