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
Stolb23 [73]
3 years ago
11

Write two statements to read in values for my_city followed by my_state. Do not provide a prompt. Assign log_entry with current_

time, my_city, and my_state. Values should be separated by a space. Sample output for given program if my_city is Houston and my_state is Texas: 2014-07-26 02:12:18: Houston Texas Note: Do not write a prompt for the input values. 1 current_time = '2014-07-26 02:12:18:' 2 my_city = "' 3 my_state = "" 4 log_entry - "' 1 test passed 6 print(log_entry) All tests passed Run Run

Computers and Technology
1 answer:
Ainat [17]3 years ago
7 0

Answer:

Here is the program:

current_time = '2014-07-26 02:12:18:'  

my_city = ''

my_state = ''

log_entry = ''

 

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between them

 

print(log_entry)

Explanation:

You can also replace

log_entry = current_time + ' ' + my_city + ' ' + my_state  

with

log_entry = f'{current_time} {my_city} {my_state}'

it uses f-strings to format the strings

If you want to hard code the values for my_city and my_state then you can replace the above

my_city = input("")

my_state = input("")

with

my_city = "Houston"

my_state = "Texas"

but if you want to read these values at the console from user then use the input() method.

The screenshot of the program along with the output is attached.

You might be interested in
Naynar kis dhrm se sambandhit hai​
Inessa05 [86]

Answer:

Islam dharm se sabandhit

5 0
3 years ago
Read 2 more answers
Which of these about non-disclosure agreements is accurate?
grandymaker [24]

Answer: number 2

Explanation: number 2

6 0
3 years ago
Read 2 more answers
Which process refers to starting up a computer
sergey [27]

It's usually called "Booting Up"

Booting up is usually the process in which you usually refers to the computer loading up basic software to the computers memory.

6 0
3 years ago
A feature that allows you to quickly apply the contents of one cell to another cell or range of cells selected.
seraphim [82]

Answer:

Auto fill

Explanation:

I took the test!

6 0
3 years ago
Which of the following is one way a corporation can raise money?
Vladimir [108]
Selling stock on the stock market
4 0
3 years ago
Other questions:
  • After brainstorming engineers may refine their ideas by making
    8·1 answer
  • Which one is a correct answer
    12·2 answers
  • _____ supplement operating system software in ways that increase the security or capabilities of the computer system. firewalls,
    15·1 answer
  • What are some effective methods for scrolling? Check all that apply.
    6·1 answer
  • Which of the following is not an example of debugging? looking for errors in programming code. fixing misspelled commands in pro
    13·1 answer
  • Which of the following is not a Nintendo game character?
    6·2 answers
  • WHAT ACTIONS CAUSE SPAM ON LINKEDIN?
    5·1 answer
  • (b) A mouse is a display device. (c) A monitor is a television.​
    10·1 answer
  • What software can be used for remote operation of a sunsdr2 dx?.
    13·1 answer
  • Importance of software in computer​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!