Python for tomorrow exam
What is the output of the code segment: result = int(3.88) print(result)
3
After the execution of the following statement, the variable price will reference the value _ price = int (68.549)
68
According to Python, what is the most appropriate type of my_var in the statement: my_var = 0.0625
Float
What is the output of the following print statement? print 'I\'m ready to begin'
I 'm ready to begin
The ———-function reads a piece of data that has been entered at the keyboard and returns that piece of data, as astringent back to the program?
Input
What is the output of the following print statement? print ('The path is D: \\sample\\test.')
The path is D: \sample\ test.
A literal is a constant you use in your Python program.
True
The CPU understands instructions written in a binary machine language.
True
Which one of the following fixes will make the given Python code run correctly? print ('Age now =',age) age=int (input ('Enter age, please: ')) print('Next year you will be ' ,age+1 ,'old .')
age=int (input ('Enter age, please: ')) print ('Age now =',age) print('Next year you will be ' ,age+1 ,'old .')
In the statement: radius 23.214 the identifier radius is an example of a floating point literal.
false
The Python language uses a compiler which is a program that both translates and executes the instructions in a high-level language.
false : interprete
Which of the following is most likely to be the output of the Python statement: print ("hello /tAhmed")
hello /tAhmed
Why of the following is a valid Python identifier? computer _programming
الإجابة الصحيحة "computer_programming" هي معرف Python صحيح لأنه يلتزم بقواعد التعريف الصحيحة في Python. الشرح بالعربي: 1. يبدأ بحرف (a-z، A-Z) أو شرطة سفلية (_). 2. يمكن أن يتبعه حروف، شرطات سفلية، أو أرقام (0-9). لذا، "computer_programming" هو معرف Python صحيح ويمكن استخدامه كاسم متغير أو اسم دالة في البرنامج.
Why one of the following is not an escape sequence character? /N
لا يوجد تعريف لهذا الرمز المز الصحيح/n