Write a Python program that asks the user for their name and then prints the name out in all uppercase and then in all lowercase letters. Write it in PythonAnywhere and submit the link to your code in the answer space below. The output should look like this: What is your name? Maria Your name in all uppercase letters is: MARIA Your name in all lowercase letters is: maria(2 points)

1 answer

Here's a simple Python program that fulfills your requirements. You can run this code in your local Python environment or in an online Python compiler.

# Ask the user for their name
name = input("What is your name? ")

# Print the name in uppercase and lowercase
print("Your name in all uppercase letters is:", name.upper())
print("Your name in all lowercase letters is:", name.lower())

How to run this code in PythonAnywhere:

  1. Go to PythonAnywhere.
  2. Sign up for a free account if you don't have one or log in if you do.
  3. Go to the "Consoles" tab and start a new Python 3 console.
  4. Copy the code above and paste it into the console.
  5. Press Enter to run the code and follow the prompts.

After running the program successfully, you can save it in a Python file, and you can share the link to that file with others.

If you need help on how to access specific features of PythonAnywhere or format the link, let me know!