Advertisement
PlainclothesCop

CodeHS Answers: 3.6.9 24 vs. "24"

Aug 25th, 2021
2,755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. # Code Segment One - Data Type - Numbers
  2. num_result = 24 + 24
  3. print(num_result)
  4.  
  5. # Code Segment Two - Data Type - Strings
  6. # Change both numbers to strings and run code
  7. # Change only one number to a string and run code. What happens?
  8. string_result = str (24) + str (24)
  9. print(string_result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement