NEW
Font size
WorksheetsPYTHON BASICS PART 1
Total questions: 10
Worksheet time: 5mins
What language are we learning?
Java
Python
Basics
Pascal
What is the built-in function to display numbers and/or texts on the screen?
printf
display
show
Is Python case-sensitive when dealing with identifiers?
machine-dependent
yes
no
none of these
What is the purpose of input statement?
Plug in something
Display data
Ask user to find correct data
Ask user to enter some data
Which of the following name is a valid identifier?
my name
percent%
num2
3interest
What will be printed out by the following statements?
a = 35
print("The value in a is ",a)
The value in a is 35
the value in a is35
a = 35
no correct answer
Which statement is NOT a valid output statement?
print ("number")
print(""number"")
print(number)
print('number')
Which statement is a VALID input statement?
input("Enter a number")
a = ("Enter a number")
a = input("Enter a number")
a=input(Enter a number)
How to display the value inside variable total with the comment string Total = ?
print ("Total = ", total)
printf ("Total = ", total)
print("Total = total")
print ("Total = " total)
If you would like to ask the user to input his/her name, what is the correct input statement?
input("Enter your name: ")
name = ("Enter your name: ")
name = input ("Enter your name: ")
name = input (Enter your name: )
