Python else if condition n = int ( input () . strip ()) check = { True : "Not Weird" , False : "Weird" } print ( check [ n % 2 == 0 and ( n in range ( 2 , 6 ) or n > 20 ) ])
const fs = require('fs');
Popular posts from this blog
Star Topology
About Star Topology. In star configuration, the central computer performs all processing and control functions. All access devices are linked directly to the central computer. The star configuration has two major limitations. First of all, the remote devices are unable to communicate directly. Instead they must communicate via the central computer only. Secondly, the star network very capable to failure, either in the central computer or the transmission links. Advantage of star topology: 1. Secure network because of central computer. 2.Easy to find network failure or errors. 3.Able to connect multiple nodes(Computer) 4.Scalable. Disadvantage of star topology: 1. If central computer goes down then full network goes down. 2.Expensive to install. 3.Doesn't possible to communicate directly from computer to computer. star topology img:www.google.com
Strings in Python
STRINGS. String is a data-type in python. String is created by enclosing text in quotes. You can use either Single quotes (' ') or Double quotes (" "). Examples: name="Hello " address="This is a string" sttring='This is single quotes string' * Input a String: string_var_name=input("Enter a string") * Length of String: To find a length of string we use (Len) Function. For Example : print(len("Hello")) >> Output >> 5 >> Some useful String Functions: strcat (String Concatenation) strcpy (String copy) srtcom (String Comparison) strlen (String Length) strrev (String Reverse) In next page we briefly learn about string functions..
Comments
Post a Comment