Computer Science, asked by vanshmittal292011, 2 months ago

write a code in python to accept your name as first and second name and display the total number of characters in your name including spaces

Answers

Answered by allysia
2

Answer:

Using python, it goes like:

\\\tt first= str ( in put("E nter \ your \ first\ na me: "))   \\ second= str ( in put("E nter \ your \ second \ na me: ")) \\ print("Total\ number\ of\ characters\ in\ the\ '", first, second ,"' is",len(first)+len(second),".")

Here's one attachment since brainly app shows distorted the indentations.

Attachments:
Answered by BrainlyEmpire
243

\pink{\sf{\star\;For\; Name}}

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • name = input(""What is your name? "") # displays the message on screen and stores the input from the user in a variable called name

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • print(""Hi """" +name)

⠀⠀⠀⠀⠀⠀⠀⠀⠀

\red{\sf{\star\;For\; Address}}

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • number = input(""Enter your house number: "")

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • street = input(""Enter your street name: "")

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • town = input(""Enter your town/city: "")

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • county = input(""Enter your county: "")

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • postcode = input(""Enter your postcode: "")

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • print(""\nAddress Details:\n"" + ""Street: "" + number + "" "" + street + ""\nTown/City: "" + town + ""\nCounty: "" + county + ""\nPostcode: "" + postcode)

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⠀

\large\underline{\pink{\sf \green{\bigstar} .}}For age:\large\underline{\pink{\sf \red{\bigstar} .}}

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • age = int(input(""Enter your age ""))

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • if age >= 18:

⠀⠀⠀⠀⠀⠀⠀⠀⠀

  • print(""You are an adult"")

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

\large\underline{\green{\sf \blue{\bigstar} .}}else\large\underline{\pink{\sf \red{\bigstar} .}}

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

\large\underline{\pink{\sf \red{\bigstar} .}}print(""You are still a child"")

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Similar questions