printing odd numbers
#printing odd numbers from 1 to n. a=int(input(“Enter last number:”)) for k in range(1,a+1): print(k+2,end=” “)
#printing odd numbers from 1 to n. a=int(input(“Enter last number:”)) for k in range(1,a+1): print(k+2,end=” “)
#printing multiplication table in python n=eval(input(“Enter a number : “)) print(“\n”) for i in range(1,11): print(i*n, end=” “)
Strings are sliced using a range of indices. string1[a : b] where a and b are integers and legal indices ,will return a slice of the string by returning the characters falling between indices a and b : starting at a, a+1, a+2 ….. till b-1. Example : string1=”abcdefghijk” then, string1[2:10] will return “defghij” string1[3:] …
The name of a person, place, thing, state, animal, feeling etc is called a noun. Simply, a noun is a naming word .Examples :Sita is a girl. Ram is a good boy. India is our country . This is my pen. It is sad oldness is troublesome. Exercise:Tick ✅ the nouns : We live in …
1. धनी सुखी है । 2. गरीब दुखी हैं । 3. बूढ़े लाचार हैं | 4. ईमानदार मेहनती होते हैं | ऐसे वाक्यों में विशेषण वाक्य का कर्ता होता है । इनका अनुवाद होता है । The + adj. + verb + … 1. धनी सुखी हैं । The rich are happy. 2. गरीब दुखी …
#printing 1 to 100 : for k in range (1,101): print(k) To print numbers in a row. Use print(k,end=” ,”)