25 solutions available
Question 21To convert the read value through input( ) into integer type, ..........( ) is used.floatingfloatintinteger
Question 22To convert the read value through input( ) into a floating point number, ..........( ) is used.floatingfloatintinteger
Question 23To print a line a text without ending it with a newline, .......... argument is used with print( )sepnewlineendnext
Question 24The default separator character of print( ) is ..........tabspacenewlinedot
Question 25To give a different separator with print( ) .......... argument is used.sepseparatorendtab
Question 15What do you understand by undefined variable in Python ?
Question 18What is the error in following code : X, Y = 7 ?
Question 19Following variable definition is creating problem X = 0281, find reasons.
Question 20"Comments are useful and easy way to enhance readability and understandability of a program." Elaborate with examples.
Question 1From the following, find out which assignment statement will produce an error. State reason(s) too.(a) x = 55(b) y = 037(c) z = 0o98(d)...
Question 3Find out the error(s) in following code fragments:(i)temperature = 90 print temperature
Question 5What is the problem with the following code fragments ?(i)a = 3 print(a) b = 4 print(b) s = a + b print(s)
Question 8Find the errors in following code fragment(a)y = x + 5 print (x, Y)
Question 10Consider the following code :name = input ("What is your name?") print ('Hi', name, ',') print ("How are you doing?")was intended to print...
Question 11Find the errors in following code fragment :c = input( "Enter your class" ) print ("Last year you were in class") c - 1
Question 12What will be returned by Python as result of following statements?(a) >>> type(0)
Question 16The id( ) can be used to get the memory address of a variable. Consider the adjacent code and tell if the id( ) functions will return the...
Question 17Consider below given two sets of codes, which are nearly identical, along with their execution in Python shell. Notice that first...
Question 2Write a program to read today's date (only del part) from user. Then display how many days are left in the current month.Solutionday =...
Question 4Modify above program so as to print output as 5@10@9.Solutiona = 5 print(a, end='@') a = a * 2 print(a, end='@') a = a - 1...
Question 6Write a Python program that accepts radius of a circle and prints its area.Solutionr = float(input("Enter radius of circle: ")) a = 3.14159...
Question 7Write Python program that accepts marks in 5 subjects and outputs average marks.Solutionm1 = int(input("Enter first subject marks: ")) m2 =...
Question 9Write a program to read a number n and print n2, n3 and n4.Solutionn = int(input("Enter n: ")) n2, n3, n4 = n ** 2, n ** 3, n ** 4 print("n...
Question 13Write a program to read details like name, class, age of a student and then print the details firstly in same line and then in separate...
Question 14Write a program to input a single digit(n) and print a 3 digit number created as <n(n + 1)(n + 2)> e.g., if you input 7, then it...