lynette_

Untitled

Oct 10th, 2025 (edited)
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.46 KB | None | 0 0
  1. :) shirt.py exists
  2. :( shirt.py exits given zero command-line arguments
  3.     Expected non-zero exit code.
  4. :( shirt.py exits given one command-line argument
  5.     Expected non-zero exit code.
  6. :( shirt.py exits given a file without a .jpg, .jpeg, or .png extension
  7.     Expected non-zero exit code.
  8. :( shirt.py exits given a non-existent file
  9.     Expected non-zero exit code.
  10. :( shirt.py exits given an output file with a different extension than input file
  11.     Expected non-zero exit code.
  12. :) shirt.py exits given more than two command-line arguments
  13. :( shirt.py correctly displays shirt on muppet_01.jpg
  14.     muppet_01_out.jpg not found
  15. :( shirt.py correctly displays shirt on muppet_02.jpg
  16.     muppet_02_out.jpg not found
  17. :( shirt.py correctly displays shirt on muppet_03.jpg
  18.     muppet_03_out.jpg not found
  19. :( shirt.py correctly displays shirt on muppet_04.jpg
  20.     muppet_04_out.jpg not found
  21. :( shirt.py correctly displays shirt on muppet_05.jpg
  22.     muppet_05_out.jpg not found
  23. :( shirt.py correctly displays shirt on muppet_06.jpg
  24.     muppet_06_out.jpg not found
  25.  
  26.  
  27. list_test = ["Joe, Jenkins", "World"]
  28.  
  29. #Grab item by index 0, split it into two to new variable
  30. test_var = list_test[0]
  31. x = test_var.split(", ")
  32.  
  33. #Create empty list and add both items from the variable with a for loop
  34. empty_list = []
  35. for word in x:
  36.     empty_list.append(word)
  37.  
  38. #Add the last item to the list
  39. empty_list.append(list_test[-1])
  40.    
  41. print(empty_list)
  42.  
  43. 0.538472
  44. 0.538472
  45. 0.384686
Advertisement
Add Comment
Please, Sign In to add comment