You are here: Home / Topics / Page / 66

Write a program to add two numbers in python

Filed under: Python on 2022-08-31 16:23:22
Program code#add two number by seperate functiondef add(a,b):return a+ba=int(input("Enter first numbern"))b=int(input("Enter second numbern"))#add and printprint("Sum is "+str(a+b))#add by function callingans=add(a,b)print("sum is "+str(ans))print(add(a,b))Output-Enter first number2Enter second numb

How to add all number in list in python

Filed under: Python on 2022-08-31 16:22:04
For calculating the sum of all numbers in the list in python, firstly we are aware of the list in python. list is mutable data type in python which hold a collection of items of different type.example -we have a list mylist=[1,2,3,4,5,6] and sum of all numbers in this list is :- 21 pr

Increment and decrement operator in python

Filed under: Python on 2022-08-31 16:20:51
In other programming language like C,C++, JAVA, we have a increment(++) and decrement(--) operator which increase and decrease the value respectively.example -a=3a++a will become 4a--a--a will become 2-But in python this type of operation is not validprogram -a=3a++print(a)a--a--print(a)output- 

What is "Set" in python

Filed under: Python on 2022-08-31 16:20:13
Set in python are also similar as the list but in set items can never be repeated but in list items may repeated. Set is a immutable data type because in set , items value are not changes or index operation is not allowed.Even in set any kind of index operation is not allowed.Example of set:- S

What are the problems with TCP IP?

Filed under: Computer on 2022-08-29 06:58:56
TCP can not keep segment data secure against the message eavesdropping attacks. TCP transports stream data used in the application layer. Since TCP does not provide any data encryption functions, anyone can gain any valuable information. TCP can not protect connections against the unauthorized acces

How TCP IP is made secure?

Filed under: Computer on 2022-08-29 06:58:09
TCP is a reliable protocol that guarantees delivery of individual packets from the source to the destination. This is accomplished through the use of an acknowledgement system where the receiving system informs the sender that it has received the packet successfully.

What is TCP IP security?

Filed under: Computer on 2022-08-29 06:57:48
For information on installing and the initial configuration of TCP/IP, refer to the Transmission Control Protocol/Internet Protocol section in Networks and communication management. For any number of reasons, the person who administers your system might have to meet a certain level of security.

Type casting in python

Filed under: Python on 2022-08-26 13:27:54
What is type casting -Conversion of one data type to another type is called type casting that means in programming at runtime we change the type of the data or variable which store data.Possible Type casting -int to floatfloat to intint to stringnumeric string to intlist to stringlist to setset to l