Im new to this can anybody help me figure this out | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Im new to this can anybody help me figure this out

Ok so i want to add two items with the variables cats and dogs then i want to print the items in the order cats and dogs like can anybody give an answer without sounding condescending. Edit just in case someone does try to help i dont have the messaging feature thing and idk how to get it

12th Mar 2024, 7:35 PM
ToastyNugget
ToastyNugget - avatar
2 Respostas
+ 1
Jason Herbst , Please add a tag for Python. You don't need to beg for help in the title. The fact that you posted in the Q&A Discussions area is sufficient to draw the attention of people who help. Instead, change your title to your question, such as "How do I print two variables?" It also helps if you show your attempted code so far, because there are many ways to print two variables, and it depends on what values they reference, etc. For example, cats = 10 dogs = 20 print(cats, dogs) print(f"It rained {cats} cats and {dogs} dogs today.") Output: 10 20 It rained 10 cats and 20 dogs today.
13th Mar 2024, 8:35 AM
Rain
Rain - avatar
0
# Define the variables cats = "cats" dogs = "dogs" # Print the items in the desired order print(cats + "and" + dogs)
12th Mar 2024, 8:56 PM
Knight
Knight - avatar