61.0k views
0 votes
Write a python statement to assign a value of 'AC105' to a variable called flight_number

User Ellabeauty
by
7.9k points

1 Answer

1 vote

Final answer:

To assign the value 'AC105' to a variable called flight_number in Python, you simply write: flight_number = 'AC105'. The Python language dynamically infers the variable's data type from the assigned value.

Step-by-step explanation:

To assign the value 'AC105' to a variable called flight_number in Python, you would write the following statement:

flight_number = 'AC105'

This line of code creates a variable named flight_number and assigns it the string value 'AC105'. In Python, you don't need to specify the data type of a variable; it is dynamically inferred from the value it is assigned.

User Jan Zeman
by
7.3k points