Answer:
Option 2: Variable names can not begin with a number.
Explanation:
As given Mark and John named a variable as 24_hour_mart while writing a program in python.
While it is forbidden to name a variable starting with any digit, only alphabets (capital and smaller) and underscore can be the first letter of the variable name.
Moreover, by considering the other options given:
- Variable name can include the underscore (_) between the words. It is used instead of spaces that are not allowed.
- There is no upper limit for variable length, it can be of any reasonable length and more than 10 characters say 11 or 12 are reasonable.
- There is no lower limit for variable length, it can be any reasonable length , even it can be of 1 character.
Variables named in python language must not be the keywords as they are reserved for other purposes.
i hope it will help you!
Answer:
Explanation:
mostTickets=0;
for (k=0; k< ndays; k++){
if (parkingTickets[k]>mostTickets) mostTickets=parkingTickets[k];
}
As far as windows 7 and below it was control panel, but in windows 8 and higher, microsoft added, a new app which was called settings, control panel was still there but with a few features removed
Answer:
The program to this question as follows:
Program:
x=int(input('Input the first number: ')) #defining variable x and input value by user
y=int(input('Input the second number: ')) #defining variable y and input value by user
if x > y: #if block to check value x>y
max=x #define variable max that hold variable x value
print('max number is: ', x) #print value
else: #else block
max=y #define variable max that holds variable y value
print('max number is: ', y) #print value
Output:
Input the first number: 22
Input the second number: 33
max number is: 33
Explanation:
In the above code two-variable, "x and y" is defined, which holds a value, which is input by the variable. In the next step, the if block statement is used that can be described as follows:
- In the if block, it will check x is greater than y it will define a variable, that is "max", that holds variable x value and prints its value.
- In the else block, if the above condition is false it uses the max variable, that holds variable y value and prints its value.