Page 99 - modular4.0
P. 99

Chapter Profile
                     2.  List the rules that must be followed when naming variables in Python.








                     3.   Write a python program that accepts two numbers and perform all the arithmetic functions and
                         displays the output.







                     4.  Explain the data types available in Python.





                                                                                                 21 st   #Critical Thinking
                 F.   Competency-based/Application-based questions.                            Century
                                                                                                Skills  #Technology Literacy
                     1.   Manan is writing a program in Python and named a variable "5name." He encounters
                         an error. What could be the possible mistake?
                     2.    Simran has entered some commands in Python that are executed immediately but
                          not saved as a program. In what mode is she operating?
                 G.   What will be the output:                                                 Century   #Technology Literacy
                                                                                                 21 st
                                                                                                Skills
                     1.  celsius = 45

                         fahrenheit = (celsius * 9/5) + 32
                         print("Temperature in Fahrenheit is:", fahrenheit)
                     2.  principal = 1000

                         rate = 5
                         time = 2
                         interest = (principal * rate * time) / 100

                         print("The simple interest is:", interest)
                     3.  counter = 0
                         print("Initial count :", counter)

                         counter += 1
                         print("Count after increment:", counter)









                                                                                         Introduction to Programming  97
   94   95   96   97   98   99   100   101   102   103   104