CS Class 11

Write a program that asks the user to enter one’s name and age. Print out a message addressed to the user that tells the user the year in which he/she will turn 100 years old.

from datetime import datedates = date.today()name = input(“Enter your Name”)age = int(input(“Enter your Age”))diff = 100 – ageresult_year = dates.year + diffprint(“You will turn 100 years old in “, result_year)

Write a program that asks the user to enter one’s name and age. Print out a message addressed to the user that tells the user the year in which he/she will turn 100 years old. Read More »

Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate = R% per annum and Time = T years.

P = int(input(“Enter Principal Amount or Money lent”))R= int(input(“Enter Rate of Interest”))T = int(input(“Enter Time Period”))SI = (P*R*T)/100amt = P + SIprint(“Amount Payable is = ” , amt)

Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate = R% per annum and Time = T years. Read More »

Which data type will be used to represent the following data values and why?

a) Number of months in a year.b) Resident of Delhi or notc) Mobile numberd) Pocket moneye) Volume of a spheref) Perimeter of a squareg) Name of the studenth) Address of the student ANS: a) ‘int’ data type will be used because number of months is always an integer or whole number. b) ‘bool’ (boolean) data

Which data type will be used to represent the following data values and why? Read More »

Python assignment statements Examples

a) Assign 10 to variable length and 20 to variable breadth.b) Assign the average of values of variables length and breadth to a variable sum.c) Assign a list containing strings ‘Paper, ‘Gel Pen’, and ‘Eraser’ to variable stationary.d) Assign the strings ‘Mohandas’, ‘Karamchand ’, and ‘Gandhi’ to variable first, middle and last.e) Assign the concatenated

Python assignment statements Examples Read More »

Which of the following identifier names are invalid and why?

Ans: a) Serial_no. Invalid We cannot use any punctuation mark in identifier name b) 1st_Room Invalid Variable name cannot begin with number c) Hundred$ Valid We can use ‘$‘anywhere in variable name except at the beginning. d) Total Marks Invalid We cannot provide space between the names of variable. e) Total_Marks Valid We can use

Which of the following identifier names are invalid and why? Read More »

How IoT and WoT are related?

IoT allow us to interact with different devices through internet using smartphones or computers, thus creates a personal network and on the other side WoT allow us to use web services to connect anything in the physical world. Hence we can say that both are communication medium Uses networking protocols Creates network of different objects

How IoT and WoT are related? Read More »

How block chain technology can be used to promote accountability, transparency and efficiency in distribution of scholarships?

The blockchain technology works on the concept of decentralized and shared database where each computer has a copy of the database. Basis on this we can define a system for scholarship that allows a group of nodes to maintain a single updated and secure ledger. Each node maintains an ‘append copy’ open ledger which is

How block chain technology can be used to promote accountability, transparency and efficiency in distribution of scholarships? Read More »

error: Content is protected !!