Question

python how can I print "Hello 55!" how can i add the exclamation mark at the...

python

how can I print "Hello 55!" how can i add the exclamation mark at the end using a comma to add my variable? 

name = 55

print( "Hello", name )  

0 0
Add a comment Improve this question Transcribed image text
Answer #1
name = 55
print("Hello " + str(name) + "!")

Add a comment
Know the answer?
Add Answer to:
python how can I print "Hello 55!" how can i add the exclamation mark at the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone please rewrite this code using a while loop? Please write it in python. #The...

    Can someone please rewrite this code using a while loop? Please write it in python. #The winning number my_number = 12 #variable for the input name user_n = input("Hello! What is your name?") #Ask the user print("Well",user_n,": I am thinking of a number between 1 and 20." + "Take a guess.") user_n = float(input("Take a guess.")) #if statements if user_n == my_number: print("Good job" ,user_n, "You guessed my number!") if user_n > my_number: print("Your guess is high. You lose.") if...

  • Hi so I want to run a Python script (in this example it can be something...

    Hi so I want to run a Python script (in this example it can be something as simple as print hello world) when a button on a Python Flask Server is pressed. In other words when I enter the web server, there will be a button and pressing it will launch the python script on my computer. Thank you

  • python beginner question! Hello, i am trying to allign the two variable below next to each...

    python beginner question! Hello, i am trying to allign the two variable below next to each other using a for loop, like this table below: 1 3 2 7 3 1 4 2 5 0 heres the code I use: balls = [1,2,3,4,5] count = [3,7,1,2,0] for j in numbers: print("{:}".format(j)) for i in count: print('{:10}'.format(i)) but the output looks like this: 1 2 3 4 5 3 7 1 2 0 i need my output to look like the...

  • Using Python Unit Test, How can I ensure that a particular string is printed , for...

    Using Python Unit Test, How can I ensure that a particular string is printed , for example, how can I ensure that "hello world" is printed and If the string is different for example "Hello Chegg" it will raise an error?

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • Without using lambda in PYTHON How can I find the word "Code" and "code" on a website and print how many times they appear?

    Without using lambda in PYTHON How can I find the word "Code" and "code" on a website and print how many times they appear?

  • Please can I have a UML Class diagram for the Python program below: def main(): print()...

    Please can I have a UML Class diagram for the Python program below: def main(): print() print("Welcome to Caesar Encryption and Viginere Decryption Cipher") print() print("Please select an option") option = "c" while option == "c": hello = input('Choose Caesar Cipher encrypt 1:\n' 'Choose Viginere Cipher Decrypt 2:\n') message = input('Enter a message: ') password = input('Enter a password: ') if hello == '1': viginere_cipher(message, password) elif hello == '2': viginere_cipher_decrypt(message, password) print() print("Choose an option") option = input('Enter c...

  • Here is an example of how you separate your code into different files add the header...

    Here is an example of how you separate your code into different files add the header file and the .cpp file to the project. ------------------------------------------------------------------ //Header file -- saved as ex1.hpp #pragma once class ex1 { public: ...ex1(){} ...void print(); }; ------------------------------------------------------------------ //.cpp file -- saved as ex1.cpp #include "ex1.hpp" #include void ex1::print() { ...std::cout<<"Hello"< } ------------------------------------------------------------------ //main -- saved as main.cpp #include "ex1.hpp" int main(void) { ...ex1 e(); ...e.print(); ...return 0; } ------------------------------------------------------------------ Why do I have the #pragma...

  • PYTHON: def printHelloWorldFunction(): print("Hello, world!") return Could you please explain the use of putting the 'return'...

    PYTHON: def printHelloWorldFunction(): print("Hello, world!") return Could you please explain the use of putting the 'return' command at the end of the function block? Is it redundant?

  • Hello, how should the code be if I want the output to be like in the...

    Hello, how should the code be if I want the output to be like in the image? it is python 3.7 For example: Test Result print numbers(00 print numbers(3) 0 1. 2

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT