├── Python ├── AreaOfCircle.py └── GuessGame.py ├── ContributorDetails.txt ├── README.md └── JAVA └── guessthenumber.java /Python/AreaOfCircle.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | print("Find the area of your Circle") 4 | r = float(input("Enter your Circle's radius")) 5 | 6 | Area = math.pi * r ** 2 7 | print("your circle's Area is",Area) 8 | -------------------------------------------------------------------------------- /ContributorDetails.txt: -------------------------------------------------------------------------------- 1 | Name: Mukesh Srivastav 2 | Bio: Currently working as an Developer. 3 | 4 | Name: Sonam Srivastav 5 | Bio: Final year student of Mechanical Engineering (Diploma). 6 | 7 | Name:Shruti Srivastav 8 | Bio: Final year student of mech.engg.(Diploma) . 9 | DOB:13-5-1998 10 | 11 | Name: Sweta verma 12 | Bio: Currently working as javaScript Developer. 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FirstTimersOnly 2 | 3 | This repositories is for the first timers only. Here you can learn how to pull request, create and merge branch. 4 | 5 | # Step to contribute in any repository 6 | 7 | 1) Fork and clone the repository. 8 | git clone https://github.com/mukesh-srivastav/FirstTimersOnly.git 9 | cd FirstTimersOnly 10 | 11 | 2) Make a branch 12 | git checkout -b (branch-name) 13 | 14 | 3)Add your content in a folder 15 | i. Add content in their respective folder 16 | ii. Save your file. 17 | 18 | 4)Commit your change 19 | 20 | git add -A 21 | git commit -m "(brief description of what you have changed/fixed)" 22 | git push -u origin (branch name) 23 | 24 | 5) Go and open a pull request from your fork to the master branch of this repository. -------------------------------------------------------------------------------- /Python/GuessGame.py: -------------------------------------------------------------------------------- 1 | print('##########################') 2 | print("Welcome to the guess game") 3 | print("You have 3 chances to guess my number btw 1 to 25") 4 | 5 | import random 6 | Random = random.randint(1, 20) 7 | # print(random.randrange(1,25,1)) 8 | 9 | 10 | for GUESS in range(1, 4): 11 | guess = int(input('Guess my secret no ')) 12 | 13 | if guess - Random < 0: 14 | if abs(guess - Random) > 3: # we dont know how to exclude these values: 15 | print("Oww.,.youre thinking too small") 16 | else: 17 | print('oww...,you made me laugh with ur small thinking haha', '\n have another try') 18 | 19 | 20 | elif guess - Random > 0: 21 | if guess - Random > 3: # we dont know how to exclude these values: 22 | print("Oww.,.youre thinking too big") 23 | else: 24 | print("oww...,you're very close", '\n have another try') 25 | 26 | else: 27 | print('You guesed it right in', str(GUESS)) 28 | 29 | print('Haha poor boy') 30 | print('The number was ', Random) 31 | 32 | -------------------------------------------------------------------------------- /JAVA/guessthenumber.java: -------------------------------------------------------------------------------- 1 | import java.util.Random; 2 | import java.util.Scanner; 3 | 4 | public class GuessTheNumber { 5 | public static void main(String[] args) { 6 | Scanner scanner = new Scanner(System.in); 7 | Random random = new Random(); 8 | 9 | int lowerBound = 1; 10 | int upperBound = 100; 11 | int numberToGuess = random.nextInt(upperBound - lowerBound + 1) + lowerBound; 12 | 13 | int numberOfTries = 0; 14 | boolean hasGuessedCorrectly = false; 15 | 16 | System.out.println("Guess the Number Game -- Made by Abhishek Mishra!"); 17 | System.out.println("I have selected a number between " + lowerBound + " and " + upperBound + ". Try to guess it."); 18 | 19 | while (!hasGuessedCorrectly) { 20 | System.out.print("Enter your guess: "); 21 | int userGuess = scanner.nextInt(); 22 | numberOfTries++; 23 | 24 | if (userGuess < lowerBound || userGuess > upperBound) { 25 | System.out.println("Please guess within the specified range."); 26 | } else if (userGuess < numberToGuess) { 27 | System.out.println("Too low! Try again."); 28 | } else if (userGuess > numberToGuess) { 29 | System.out.println("Too high! Try again."); 30 | } else { 31 | hasGuessedCorrectly = true; 32 | System.out.println("Congratulations! You guessed the number in " + numberOfTries + " tries."); 33 | } 34 | } 35 | 36 | scanner.close(); 37 | } 38 | } 39 | --------------------------------------------------------------------------------