Ashton assigned a string value to a variable. Which program statement should he use?

a
5myCity = "Dallas"
b
my City = "Dallas"
c
myCity = "Dallas"
d
myCity! = "Dallas"

Respuesta :

He wants to assign a string to a variable therefore, the program statement should be myCity = "Dallas"

what is variable?

Variables are containers for storing values. The value may be any kind of datatype such as Boolean, strings, integers, float etc.

In python, there are rules in declaring a variable.

  • Variables don't begin with numbers
  • Spaces are not used

The conventional pattern in declaring variables is camel case method.  Therefore, the conventional way to store the string "Dallas" in the variable  is as follows:

  • myCity = "Dallas"

learn more on variable here: https://brainly.com/question/21335728