[python] Karem

Viewer

  1. Sure, here's a sample code for printing "Happy Birthday Dalpat" in Python:
  2.  
  3. ```python
  4. print("Happy Birthday Dalpat!")
  5. ```Here's a modified version of the code that includes your name as well:
  6.  
  7. ```python
  8. name = "Dalpat"
  9. print("Happy Birthday " + name + "!")
  10. ```
  11.  
  12. This code defines a variable `name` with the value of "DalTo make the code more interactive, you can also ask the user for input to personalize the message. Here's an example:
  13.  
  14. ```python
  15. name = input("What's your name? ")
  16. print("Happy Birthday " + name + "!")
  17. ```
  18.  
  19. This code will ask the user for their name and then print "Happy Birthday [name]!"

Editor

You can edit this paste and save as new:


File Description
  • Karem
  • Paste Code
  • 11 Dec-2023
  • 627 Bytes
You can Share it: