Find syntax error in the following Python code:
n1,n2=5,4
if n1=n2:
print("Equal")
Find syntax error in the following Python code:
a=b=c=12,13,14
if (a>=b or a<=c and a+c<=b):
print("A")
ELSE print(a+b+c)
Find syntax error in the following Python code:
n1=n2=12/5
if n1!=n2
print "Not equal"
else print "Equal"
Find syntax error in the following Python code:
12=age
if age=<10:
print(Primary)
elseif age=<13:
print(Middle)
elseif age<=15:
print(Secondary)
else age<=17:
print(Sr Secondary)
Find syntax error in the following Python code:
num=int(input("Enter an integer: "))
if num<0:
num=-num;
if num>=0 AND num<=9
print("Single digit number")
elif: num>=10 OR num<=99
print("Two digit number")
elif: num<=999
print("Three digit number")
else: print("Number contains more than 3 digits")
Find output generated by the following script:
age=12
if not age<18:
print("Group A")
else: print("Group B")
Find output generated by the following script:
#Find the outputs for n=1900 and 1980
if n%100!=0 and n%4==0 or n%400==0:
print("Lp")
else: print("Not Lp")
Find output generated by the following script:
n1=13
n2=n1/2*2
n3=n1//2*2
if n1==n2:
print("Integer")
else: print("Non integer")
if n1==n3:
print("Integer")
else: print("Non integer")
Find output generated by the following script:
a,b,c=12,13,9
d=a%b+b%c
print(d//2==d/2)
print(d//3==d/3)
ind output generated by the following script:
num=int(input("Enter an integer: "))
#find output for num=-245, 4, 44, 444, and 5685
if num<0:
num=-num;
if num>=0 and num<=9:
print("Single digit number")
elif num>=10 or num<=99:
print("Two digit number")
elif num<=999:
print("Three digit number")
else: print("Number contains more than 3 digits")
Answers
Answered by
3
The interpreter acts as a simple calculator: you can type an expression at it and it will write the value. Expression syntax is straightforward: the operators +, -, * and / work just like in most other languages (for example, Pascal or C); parentheses (()) can be used for grouping. For example:
>>>>>> 2 + 2 4 >>> 50 - 5*6 20 >>> (50 - 5*6) / 4 5.0 >>> 8 / 5 # division always returns a floating point number 1.6
Answered by
0
Answer:
a do so en TV in TV TV in in in
Similar questions
English,
5 months ago
Science,
5 months ago
India Languages,
10 months ago
Biology,
10 months ago
Math,
1 year ago