1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zzz [600]
3 years ago
12

Complete the code to convert a float to a string. answer=5.3 strAnswer=__ (answer)

Computers and Technology
2 answers:
torisob [31]3 years ago
6 0

strAnswer = str(answer)

I hope this helps!

ycow [4]3 years ago
5 0

Answer:

its just "str"

Explanation:

You might be interested in
Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
Mnenie [13.5K]
Maria should use the Cooking blog that has known and verified information and step by step instructions Comments can lead to disaster and/or incorrect recipe use
8 0
4 years ago
Read 2 more answers
Which heat transfer can be described as currents of warm air rising and cool air falling
erik [133]
Convection would be the answer to thisssss

3 0
4 years ago
An effective problem statement ensures that
jeka94

Answer:

C: The software design effectively addresses the issues.

Explanation:

It's the correct answer.

5 0
4 years ago
What feature of excel allows you to automatically calculate common formulas which select data
Masteriza [31]
See attached word doc Autosum
Download doc
6 0
4 years ago
Write a program that creates a map containing the U.S. states as keys, and their capitals as values. (Use the Internet to get a
seraphim [82]

Answer:

Here is the Python program:

import random  #  to generate random numbers

def quiz():  #method quiz to ask state's capital

   capitals={"Washington":"Olympia","Oregon":"Salem",\

                   "California":"Sacramento","Ohio":"Columbus",\

                   "Nebraska":"Lincoln","Colorado":"Denver",\

                   "Michigan":"Lansing","Massachusetts":"Boston",\

                   "Florida":"Tallahassee","Texas":"Austin",\

                   "Oklahoma":"Oklahoma City","Hawaii":"Honolulu",\

                   "Alaska":"Juneau","Utah":"Salt Lake City",\

                   "New Mexico":"Santa Fe","North Dakota":"Bismarck",\

                   "South Dakota":"Pierre","West Virginia":"Charleston",\

                   "Virginia":"Richmond","New Jersey":"Trenton",\

                   "Minnesota":"Saint Paul","Illinois":"Springfield",\

                   "Indiana":"Indianapolis","Kentucky":"Frankfort",\

                   "Tennessee":"Nashville","Georgia":"Atlanta",\

                   "Alabama":"Montgomery","Mississippi":"Jackson",\

                   "North Carolina":"Raleigh","South Carolina":"Columbia",\

                   "Maine":"Augusta","Vermont":"Montpelier",\

                   "New Hampshire":"Concord","Connecticut":"Hartford",\

                   "Rhode Island":"Providence","Wyoming":"Cheyenne",\

                   "Montana":"Helena","Kansas":"Topeka",\

                   "Iowa":"Des Moines","Pennsylvania":"Harrisburg",\

                   "Maryland":"Annapolis","Missouri":"Jefferson City",\

                   "Arizona":"Phoenix","Nevada":"Carson City",\

                   "New York":"Albany","Wisconsin":"Madison",\

                   "Delaware":"Dover","Idaho":"Boise",\

                   "Arkansas":"Little Rock","Louisiana":"Baton Rouge"}

#dictionary of states along with their capitals    

   quit=False   #exit option

   print ("Welcome to the States capitals quiz game!")  

   wrong_ans = False   # boolean variable for incorrect answer

   while not quit and len(capitals)>0:  

#loop continues until all state capitals are finished and user presses q

       choice = random.choice(list(capitals.keys()))  

#choice variable stores randomly generated list of pick

       right_ans = capitals.get(choice)  #stores correct answer

       print ("\nWhat is the capital city of",choice,"?")

       user_ans = input("Your guess:  ")  #answer entered by user

       if user_ans.lower()=='q':  #if user presses q to quit

           quit=True  #quit value become true

           print("The quiz is over! Bubye!")  

#displays the above message and quits the program

       elif user_ans.lower()==right_ans.lower():  #if user enters correct guess

           print ("Right Answer! \n")  # displays this message

       else:  #if user enters wrong guess

           print ("Wrong Answer!\n")  #displays wrong answer message

           print ("The right answer is ",right_ans)  #prints right capital

           wrong_ans = True          

quiz()       #calls quiz function to begin with the quiz

Explanation:

The program has a dictionary that contains the US states as keys and their capitals as values. The program asks the user to enter the capital of a random state. This state is selected randomly from the list of states using random function and keys() method is used to display list of all keys in the capital states dictionary. The while loop starts which keeps asking the user to guess the capital of states. This loop ends when the user types q to quit the program or all the capitals of the states are covered. Now the user guess is compared to the right answer, if the user has correctly guessed the capital then the Right answer message is displayed otherwise Wrong answer is displayed. After Wrong answer message the correct answer  is displayed and the quiz starts again until the user enters q to exit. When the user types q the message: The quiz is over! Bubye! is displayed and the programs exits.

8 0
4 years ago
Other questions:
  • What is the focus of developers interested in the Internet of things?
    11·2 answers
  • QUICK ANSWER- what is the function of GUI
    6·2 answers
  • Use the Law of Sines to solve the triangle. Round your answers to two decimal places.
    6·1 answer
  • A Homecoming Crossword Puzzle
    12·1 answer
  • James would like to send a document he has saved on the hard drive to coworkers in Ireland, Brazil, and India. These coworkers h
    6·2 answers
  • What are two tasks that need to be done to a hard drive before operations can use it
    11·1 answer
  • Which of the following best describes the protocol used on the internet?
    8·1 answer
  • How do you send friend requests?
    8·1 answer
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • Use a slicer to filter the data in this table to show only rows where the Category value is Coffee or Meals
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!