# shravanthi shravz

## 21 Strategy Game

In this article, we will develop a game called 21 strategy game with the necessary algorithm and code. Outline The user and Computer will choose a number from 1 to 3. Whichever player reaches the total of 21 first, loses the game. Algorithm Import the random module. Write a function to specify who wants to …

## Rock Paper Scissor Game in python

In this article, we will discuss how to create a rock paper, and scissors game in python. Outline We will ask the user to select either rock paper or scissors. And we will also make the computer choose one out of three randomly. Now we will check who won the game and give them a …

## Guess the Number Game

In this article, we will discuss how to write a program for guessing the number game. Outline Our program will ask the user to guess a number between 1-10(both included). We will give 3 chances to guess. Afterward, we can ask y=the user if they want to continue the game and proceed according to the …

## Sets in python

Introduction “The expert in anything was once a beginner” In this article, we will discuss a unique data type called sets with all its unique properties. We can also discuss the operators which are unique to sets. Definition A Set is an unordered collection(Not indexed) data type which cannot be modified but addition and deletion …

## Tuples in python

Introduction “Never stop learning, because life never stops teaching” In this article, we will discuss a unique data type called tuples with all its unique properties. Tuple Definition Tuples are the same as the list except a tuple is immutable(which means it cannot be modified). We represent tuple with round brackets(). The syntax for creating …

## Dictionary in python

Introduction This article will discuss a data structure called a dictionary in python. We will also discuss, the creation, updating, modification, accessing, built-in methods, etc with respect to the dictionary. Definition Dictionary is a data structure that will hold a list of key-value pairs. Dictionaries are unordered, which means there is no index for dictionaries. …

## List In Python

Introduction “The beautiful thing about learning is that no one can take it away from you.” This article will discuss a data type called list in python. We will also discuss, the creation, updating, modification, accessing, slicing, built-in methods, basic operators, etc with respect to the list. Definition The list is one of the most …

## Random module in python

Introduction “The best way to predict the future is to create it.” This article will discuss a few built-in modules in python, mainly we will focus on the random module in python. Built-in modules Modules are files containing a set of functions you want to include in your application just by importing them. Python offers …

## User-Defined Functions

Introduction in python We already have a glimpse of built-in functions in python. In this article, we will discuss user-defined functions in detail. Function Imagine, you have some lines of code which need to be repeated at various parts of your code, you will feel comfortable if we write those lines in one place and …

## Built-in Functions and Methods in python

Introduction In this article, we can check some of the built-in functions and methods commonly used with examples in python. We can also check out the difference between them. Built-in functions and methods Imagine, you have some lines of code which need to be repeated at various parts of your code, you will feel comfortable …