FORLOOPS ASSIGNMENT
https://replit.com/@Karan9311/Karanveerforloops?v=1
karanveerforloops__1_.zip |
Purpose:
Your task is to create a program that has the user enter in the following information:
Code running:
Enter start value (-5000 to 5000): -5050
Error: Value must be between -5000 and 5000
Enter start value (-5000 to 5000): 435435
Error: Value must be between -5000 and 5000
Enter start value (-5000 to 5000): 565
Enter end value (-5000 to 5000): 999
Enter change value (1 to 10): 4
565 569 573 577 581 585 589 593 597 601 605 609 613 617 621 625 629 633 637 641 645 649 653 657 661 665 669 673 677 681 685 689 693 697 701 705 709 713 717 721 725 729 733 737 741 745 749 753 757 761 765 769 773 777 781 785 789 793 797 801 805 809 813 817 821 825 829 833 837 841 845 849 853 857 861 865 869 873 877 881 885 889 893 897 901 905 909 913 917 921 925 929 933 937 941 945 949 953 957 961 965 969 973 977 981 985 989 993 997
To repeat a-yes, b-no. Enter choice:a
Enter start value (-5000 to 5000): 44
Enter end value (-5000 to 5000): 4
Enter change value (1 to 10): 4
44 40 36 32 28 24 20 16 12 8 4
To repeat a-yes, b-no. Enter choice:b
Thank you for using my program think about visiting again
Your task is to create a program that has the user enter in the following information:
- Start value within a range (example -5000 to 5000)
- End value within the same range
- Change value as a positive number: (Ex. 5 regardless of whether the program is to count up or down)
- Based on the values entered by the user, the program should then display the list from the the start value to the end value
- The trick... based on the actual values entered by the user, you program needs to determine which way the inequality is to go (< or >) and whether it should be a positive (increment) or negative (decrement) change
- Other options:
- Use of constants to set the minimum and maximum values for the lists
- Is it inclusive or non-inclusive - ex 1..15 by 1 include the 15 in the display or not (this means is it < or <=)
- Option to repeat for another list of numbers
Code running:
Enter start value (-5000 to 5000): -5050
Error: Value must be between -5000 and 5000
Enter start value (-5000 to 5000): 435435
Error: Value must be between -5000 and 5000
Enter start value (-5000 to 5000): 565
Enter end value (-5000 to 5000): 999
Enter change value (1 to 10): 4
565 569 573 577 581 585 589 593 597 601 605 609 613 617 621 625 629 633 637 641 645 649 653 657 661 665 669 673 677 681 685 689 693 697 701 705 709 713 717 721 725 729 733 737 741 745 749 753 757 761 765 769 773 777 781 785 789 793 797 801 805 809 813 817 821 825 829 833 837 841 845 849 853 857 861 865 869 873 877 881 885 889 893 897 901 905 909 913 917 921 925 929 933 937 941 945 949 953 957 961 965 969 973 977 981 985 989 993 997
To repeat a-yes, b-no. Enter choice:a
Enter start value (-5000 to 5000): 44
Enter end value (-5000 to 5000): 4
Enter change value (1 to 10): 4
44 40 36 32 28 24 20 16 12 8 4
To repeat a-yes, b-no. Enter choice:b
Thank you for using my program think about visiting again
LOOPGALORE ASSIGNMENT
karanveerforloops__1_.zip |
Purpose:
Create the for loops to complete the following tasks: (remember to make the display look good)
**
***
****
*****
****
***
**
*
Code Running:
Question 1 (1 to 25)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
******************************************************************
Question 2 (2 to 8)
2 3 4 5 6 7 8
******************************************************************
Question 3 (50 to 100)
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 7980 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
******************************************************************
Question 4 (1 to 75 by 4)
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
******************************************************************
Question 5 (36 to 600 by 15)
36 51 66 81 96 111 126 141 156 171 186 201 216 231 246 261 276 291 306 321 336 351 366 381 396 411 426 441 456 471 486 501 516 531 546 561 576 591
******************************************************************
Question 6 (-25 to 105 by 7)
-25 -18 -11 -4 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101
******************************************************************
Question 7 (-350 to 350 by 8)
-350 -342 -334 -326 -318 -310 -302 -294 -286 -278 -270 -262 -254 -246 -238 -230 -222 -214 -206 -198 -190 -182 -174 -166 -158 -150 -142 -134 -126 -118 -110 -102 -94 -86 -78 -70 -62 -54 -46 -38 -30 -22 -14 -6 2 10 18 26 34 42 50 58 66 74 82 90 98 106 114 122 130 138 146 154 162 170 178 186 194 202 210 218 226 234 242 250 258 266 274 282 290 298 306 314 322 330 338 346
******************************************************************
Question 8 (100 to 1 by 1)
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 7170 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 4140 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 1110 9 8 7 6 5 4 3 2 1
******************************************************************
Question 9 (1000 to 700 by 5)
1000 995 990 985 980 975 970 965 960 955 950 945 940 935 930 925 920 915 910 905 900 895 890 885 880 875 870 865 860 855 850 845 840 835 830 825 820 815 810 805 800 795 790 785 780 775 770 765 760 755 750 745 740 735 730 725 720 715 710 705 700
******************************************************************
Question 10 (180 to -50 by 6)
180 174 168 162 156 150 144 138 132 126 120 114 108 102 96 90 84 78 72 66 60 54 48 42 36 30 24 18 12 60-6 -12 -18 -24 -30 -36 -42 -48
******************************************************************
Question 11 (-30 to -600 by 25)
-30 -55 -80 -105 -130 -155 -180 -205 -230 -255 -280 -305 -330 -355 -380 -405 -430 -455 -480 -505 -530 -555 -580
******************************************************************
Question 12 (1 and 200 including 200)
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 5860 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192 194 196 198 200
******************************************************************
Question 13 (200 and 300 inclusive)
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
******************************************************************
Question 14 (1 and 400 that are divisible by 7)
7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210 217 224 231 238 245 252 259 266 273 280 287 294 301 308 315 322 329 336 343 350 357 364 371 378 385 392 399
******************************************************************
Question 15 (The numbers between 1 and 500 that are equally divisible by both 6 and 4:)
12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360 372 384 396 408 420 432 444 456 468 480 492
Question 16 :Use a loop to create a design using stars (could be a simple triangle or something more complex):
Enter in the desired length for your longest row: 8
*
**
***
****
*****
******
*******
********
*******
******
*****
****
***
**
*
Create the for loops to complete the following tasks: (remember to make the display look good)
- For loop to display the numbers 1 to 25
- For loop to display the numbers 2 to 8
- For loop to display the numbers 50 to 100
- Counting from 1 to 75 by 4
- Counting from 36 to 600 by 15
- Counting from -25 to 105 by 7
- Counting from -350 to 350 by 8
- Counting from 100 to 1 by 1
- Counting from 1000 to 700 by 5
- Counting from 180 to -50 by 6
- Counting from -30 to -600 by 25
- The even numbers between 1 and 200 including 200
- The odd numbers between 200 and 300 inclusive
- The numbers between 1 and 400 that are divisible by 7
- The numbers between 1 and 500 that are equally divisible by both 6 and 4
- Use a loop to create a design using stars (could be a simple triangle or something more complex):
**
***
****
*****
****
***
**
*
Code Running:
Question 1 (1 to 25)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
******************************************************************
Question 2 (2 to 8)
2 3 4 5 6 7 8
******************************************************************
Question 3 (50 to 100)
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 7980 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
******************************************************************
Question 4 (1 to 75 by 4)
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
******************************************************************
Question 5 (36 to 600 by 15)
36 51 66 81 96 111 126 141 156 171 186 201 216 231 246 261 276 291 306 321 336 351 366 381 396 411 426 441 456 471 486 501 516 531 546 561 576 591
******************************************************************
Question 6 (-25 to 105 by 7)
-25 -18 -11 -4 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101
******************************************************************
Question 7 (-350 to 350 by 8)
-350 -342 -334 -326 -318 -310 -302 -294 -286 -278 -270 -262 -254 -246 -238 -230 -222 -214 -206 -198 -190 -182 -174 -166 -158 -150 -142 -134 -126 -118 -110 -102 -94 -86 -78 -70 -62 -54 -46 -38 -30 -22 -14 -6 2 10 18 26 34 42 50 58 66 74 82 90 98 106 114 122 130 138 146 154 162 170 178 186 194 202 210 218 226 234 242 250 258 266 274 282 290 298 306 314 322 330 338 346
******************************************************************
Question 8 (100 to 1 by 1)
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 7170 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 4140 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 1110 9 8 7 6 5 4 3 2 1
******************************************************************
Question 9 (1000 to 700 by 5)
1000 995 990 985 980 975 970 965 960 955 950 945 940 935 930 925 920 915 910 905 900 895 890 885 880 875 870 865 860 855 850 845 840 835 830 825 820 815 810 805 800 795 790 785 780 775 770 765 760 755 750 745 740 735 730 725 720 715 710 705 700
******************************************************************
Question 10 (180 to -50 by 6)
180 174 168 162 156 150 144 138 132 126 120 114 108 102 96 90 84 78 72 66 60 54 48 42 36 30 24 18 12 60-6 -12 -18 -24 -30 -36 -42 -48
******************************************************************
Question 11 (-30 to -600 by 25)
-30 -55 -80 -105 -130 -155 -180 -205 -230 -255 -280 -305 -330 -355 -380 -405 -430 -455 -480 -505 -530 -555 -580
******************************************************************
Question 12 (1 and 200 including 200)
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 5860 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192 194 196 198 200
******************************************************************
Question 13 (200 and 300 inclusive)
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
******************************************************************
Question 14 (1 and 400 that are divisible by 7)
7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210 217 224 231 238 245 252 259 266 273 280 287 294 301 308 315 322 329 336 343 350 357 364 371 378 385 392 399
******************************************************************
Question 15 (The numbers between 1 and 500 that are equally divisible by both 6 and 4:)
12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360 372 384 396 408 420 432 444 456 468 480 492
Question 16 :Use a loop to create a design using stars (could be a simple triangle or something more complex):
Enter in the desired length for your longest row: 8
*
**
***
****
*****
******
*******
********
*******
******
*****
****
***
**
*
Elf Name Generator
karanveerelfgenerator.zip |
Purpose: Array
- It is a group of variables of similar data types referred to by a single element.
- Its elements are stored in a contiguous memory location.
- The size of the array should be mentioned while declaring it.
- Array elements are always counted from zero (0) onward.
- Array elements can be accessed using the position of the element in the array.
- The array can have one or more dimensions.
***
Code running:
Welcome to Elf Generator!
Here you will generate an elf name based on you
Enter your favourite colour: 1 - red, 2 - blue, .... 10 - black.
Make your choice: 2
Enter the number of the month you were born in (Ex Jan - 1, Dec - 12): 5
Elf Name: MerryGnome
To repeat 1-yes, 2-no. Enter choice:1
Enter your favourite colour: 1 - red, 2 - blue, .... 10 - black.
Make your choice: 3
Enter the number of the month you were born in (Ex Jan - 1, Dec - 12): 7
Elf Name: BrightDryad
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
Practice 1 = Grade Assignment
karanveerpractice1.zip |
Purpose: - welcome user to the program
- use cout / cin statements to have user enter each value
- use loops to ensure each value entered is within range (0 - 100%)
- use escape sequences \n and \t
- correct commenting
Extensions:
- loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no)
- calculate and display average and / or GPA
Code running:
Grade Calculator!
Enter your first class : Chem
Enter your second class : Math
Enter your third class : Comp
Enter your fourth class : English
Enter mark for Chem: 89
Enter mark for Math: 98
Enter mark for Comp: 87
Enter mark for English: 97
Subjects Mark
Chem 89
Math 98
Comp 87
English 97
________________________________________
Average 92.75%
To repeat 1-yes, 2-no. Enter choice:1
Enter your first class : Chem
Enter your second class : Math
Enter your third class : COmp
Enter your fourth class : Eng
Enter mark for Chem: 99
Enter mark for Math: 96
Enter mark for COmp: 88
Enter mark for Eng: 89
Subjects Mark
Chem 99
Math 96
COmp 88
Eng 89
________________________________________
Average 93%
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
- use cout / cin statements to have user enter each value
- use loops to ensure each value entered is within range (0 - 100%)
- use escape sequences \n and \t
- correct commenting
Extensions:
- loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no)
- calculate and display average and / or GPA
Code running:
Grade Calculator!
Enter your first class : Chem
Enter your second class : Math
Enter your third class : Comp
Enter your fourth class : English
Enter mark for Chem: 89
Enter mark for Math: 98
Enter mark for Comp: 87
Enter mark for English: 97
Subjects Mark
Chem 89
Math 98
Comp 87
English 97
________________________________________
Average 92.75%
To repeat 1-yes, 2-no. Enter choice:1
Enter your first class : Chem
Enter your second class : Math
Enter your third class : COmp
Enter your fourth class : Eng
Enter mark for Chem: 99
Enter mark for Math: 96
Enter mark for COmp: 88
Enter mark for Eng: 89
Subjects Mark
Chem 99
Math 96
COmp 88
Eng 89
________________________________________
Average 93%
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
Practice 2 = Temperature Conversion
karanveerpractice2__1_.zip |
Purpose:
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: k
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in Kelvin : 43
Celcius: -230.15
Fahrenheit: -382.27
To repeat 1-yes, 2-no. Enter choice:1
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: c
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in celcius : 554
Fahrenheit: 1029.2
Kelvin: 827.15
To repeat 1-yes, 2-no. Enter choice:1
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: f
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in Farenheit : 54
Celcius: 12.2222
Kelvin: 285.372
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
- Write a program which allows user to choose what type of temperature conversion they want to do. .
- Enter Farenheit convert to centigrade
- Enter Centigrade convert to Farenheit
- The choices could be (1) for... (2) for ... or F, f, C, c ... whichever you choose. Make sure their choice is valid
- Formulae to use
- C = 5/9(°F – 32)
- F = 9/5°C + 32
- Incorporate minimum and maximum values - you need to decide what would be acceptable limits. Do some research.
- Loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no, or y, Y, n, N)
- You will be assessed on
- Accuracy of calculations
- Presentation
- Commenting
- Extensions:
- Include an option to convert temperatures into and out of Kelvin
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: k
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in Kelvin : 43
Celcius: -230.15
Fahrenheit: -382.27
To repeat 1-yes, 2-no. Enter choice:1
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: c
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in celcius : 554
Fahrenheit: 1029.2
Kelvin: 827.15
To repeat 1-yes, 2-no. Enter choice:1
TEMPERATURE SYSTEM CONVERTER
Please, enter the temperature and measurement system:
C. Celcius
F. Fahrenheit
K. Kelvin
Temperature system: f
The maximum value is: 2147483647
The minimum value is: -2147483648
Temperature in Farenheit : 54
Celcius: 12.2222
Kelvin: 285.372
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
Random numbers
karanveerdice__1_.zip |
Choose something like dice, coins, cards, marbles and produce a probability analysi
Dice Rolls:
4 2 2 1 5 5 1 3
3 3 6 6 4 4 1 3
5 1 2 5 4 4 4 6
4 1 5 1 3 4 5 1
3 4 5 6 2 5 2 3
5 1 2 3 2 6 5 1
1 6 3 2 3 6 1 5
1 3 5 3 5 3 1 1
1 3 6 6 1 5 6 6
5 5 6 5 5 4 5 3
1 1 4 2 1 2 6 1
4 4 1 2 4 2 1 2
4 6 6 3 5 5 6 1
4 5 5 6 6 1 2 6
2 3 1 2 4 6 6 5
1 6 5 5 5 5 4 1
2 3 1 6 2 6 5 3
2 1 2 1 2 1 4 3
1 5 2 4 2 1 6 1
4 4 3 1 6 6 1 2
3 1 5 2 4 3 4 3
4 3 1 3 3 4 5 3
6 4 4 6 4 1 6 5
3 2 5 2 1 3 1 1
1 6 6 2 6 3 4 1
3 4 3 3 6 1 3 5
2 4 4 3 5 1 2 1
2 4 6 1 1 1 1 1
6 1 3 3 1 4 4 2
6 6 4 5 5 5 1 6
Time rolled: 240
Number of 1's rolled: 55 Probability: 22.9167%
Number of 2's rolled: 32 Probability: 13.3333%
Number of 3's rolled: 38 Probability: 15.8333%
Number of 4's rolled: 37 Probability: 15.4167%
Number of 5's rolled: 39 Probability: 16.25%
Number of 6's rolled: 39 Probability: 16.25%
To repeat 1-yes, 2-no. Enter choice:1
Dice Rolls:
2 3 3 4 3 4 2 3
5 2 3 5 6 1 4 5
1 4 1 6 1 4 1 6
2 2 2 6 6 3 5 6
5 5 3 5 6 5 1 5
6 3 3 5 4 4 1 2
1 5 5 6 1 3 3 2
3 5 5 2 5 3 5 3
6 2 5 5 6 6 3 3
6 4 5 3 1 3 3 6
5 1 5 3 2 5 2 4
3 6 3 1 1 2 1 6
3 4 4 6 3 1 6 2
2 2 3 2 4 5 5 6
3 3 3 2 6 4 5 2
4 2 1 4 1 5 1 3
2 4 6 2 2 3 2 3
4 4 3 1 6 5 6 6
2 6 2 5 4 4 6 1
5 4 2 5 1 2 5 6
3 2 6 3 4 1 3 1
4 5 5 1 4 3 6 3
2 5 1 5 3 4 3 5
6 4 4 4 3 6 3 4
6 2 6 3 6 2 2 3
5 6 1 6 2 1 6 4
3 4 6 5 5 3 4 4
4 5 1 5 4 2 2 1
1 5 4 1 6 5 1 2
2 6 1 4 6 6 5 6
Time rolled: 240
Number of 1's rolled: 33 Probability: 13.75%
Number of 2's rolled: 38 Probability: 15.8333%
Number of 3's rolled: 45 Probability: 18.75%
Number of 4's rolled: 37 Probability: 15.4167%
Number of 5's rolled: 44 Probability: 18.3333%
Number of 6's rolled: 43 Probability: 17.9167%
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
4 2 2 1 5 5 1 3
3 3 6 6 4 4 1 3
5 1 2 5 4 4 4 6
4 1 5 1 3 4 5 1
3 4 5 6 2 5 2 3
5 1 2 3 2 6 5 1
1 6 3 2 3 6 1 5
1 3 5 3 5 3 1 1
1 3 6 6 1 5 6 6
5 5 6 5 5 4 5 3
1 1 4 2 1 2 6 1
4 4 1 2 4 2 1 2
4 6 6 3 5 5 6 1
4 5 5 6 6 1 2 6
2 3 1 2 4 6 6 5
1 6 5 5 5 5 4 1
2 3 1 6 2 6 5 3
2 1 2 1 2 1 4 3
1 5 2 4 2 1 6 1
4 4 3 1 6 6 1 2
3 1 5 2 4 3 4 3
4 3 1 3 3 4 5 3
6 4 4 6 4 1 6 5
3 2 5 2 1 3 1 1
1 6 6 2 6 3 4 1
3 4 3 3 6 1 3 5
2 4 4 3 5 1 2 1
2 4 6 1 1 1 1 1
6 1 3 3 1 4 4 2
6 6 4 5 5 5 1 6
Time rolled: 240
Number of 1's rolled: 55 Probability: 22.9167%
Number of 2's rolled: 32 Probability: 13.3333%
Number of 3's rolled: 38 Probability: 15.8333%
Number of 4's rolled: 37 Probability: 15.4167%
Number of 5's rolled: 39 Probability: 16.25%
Number of 6's rolled: 39 Probability: 16.25%
To repeat 1-yes, 2-no. Enter choice:1
Dice Rolls:
2 3 3 4 3 4 2 3
5 2 3 5 6 1 4 5
1 4 1 6 1 4 1 6
2 2 2 6 6 3 5 6
5 5 3 5 6 5 1 5
6 3 3 5 4 4 1 2
1 5 5 6 1 3 3 2
3 5 5 2 5 3 5 3
6 2 5 5 6 6 3 3
6 4 5 3 1 3 3 6
5 1 5 3 2 5 2 4
3 6 3 1 1 2 1 6
3 4 4 6 3 1 6 2
2 2 3 2 4 5 5 6
3 3 3 2 6 4 5 2
4 2 1 4 1 5 1 3
2 4 6 2 2 3 2 3
4 4 3 1 6 5 6 6
2 6 2 5 4 4 6 1
5 4 2 5 1 2 5 6
3 2 6 3 4 1 3 1
4 5 5 1 4 3 6 3
2 5 1 5 3 4 3 5
6 4 4 4 3 6 3 4
6 2 6 3 6 2 2 3
5 6 1 6 2 1 6 4
3 4 6 5 5 3 4 4
4 5 1 5 4 2 2 1
1 5 4 1 6 5 1 2
2 6 1 4 6 6 5 6
Time rolled: 240
Number of 1's rolled: 33 Probability: 13.75%
Number of 2's rolled: 38 Probability: 15.8333%
Number of 3's rolled: 45 Probability: 18.75%
Number of 4's rolled: 37 Probability: 15.4167%
Number of 5's rolled: 44 Probability: 18.3333%
Number of 6's rolled: 43 Probability: 17.9167%
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
Number Guessing
karanveerguessing.zip |
Number guessing game
Enter a guess between 1 and 100 : 64
Too low!
Enter a guess between 1 and 100 : 88
Too high!
Enter a guess between 1 and 100 : 78
Too low!
Enter a guess between 1 and 100 : 80
Too low!
Enter a guess between 1 and 100 : 84
Too low!
Enter a guess between 1 and 100 : 87
Too high!
Enter a guess between 1 and 100 : 86
Too high!
Enter a guess between 1 and 100 : 85
Correct! You got it in 8 guesses!
To repeat 1-yes, 2-no. Enter choice:1
Number guessing game
Enter a guess between 1 and 100 : 14
Too low!
Enter a guess between 1 and 100 : 75
Too high!
Enter a guess between 1 and 100 : 54
Too high!
Enter a guess between 1 and 100 : 34
Too high!
Enter a guess between 1 and 100 : 25
Too high!
Enter a guess between 1 and 100 : 22
Too high!
Enter a guess between 1 and 100 : 15
Too low!
Enter a guess between 1 and 100 : 18
Correct! You got it in 8 guesses!
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again
Enter a guess between 1 and 100 : 64
Too low!
Enter a guess between 1 and 100 : 88
Too high!
Enter a guess between 1 and 100 : 78
Too low!
Enter a guess between 1 and 100 : 80
Too low!
Enter a guess between 1 and 100 : 84
Too low!
Enter a guess between 1 and 100 : 87
Too high!
Enter a guess between 1 and 100 : 86
Too high!
Enter a guess between 1 and 100 : 85
Correct! You got it in 8 guesses!
To repeat 1-yes, 2-no. Enter choice:1
Number guessing game
Enter a guess between 1 and 100 : 14
Too low!
Enter a guess between 1 and 100 : 75
Too high!
Enter a guess between 1 and 100 : 54
Too high!
Enter a guess between 1 and 100 : 34
Too high!
Enter a guess between 1 and 100 : 25
Too high!
Enter a guess between 1 and 100 : 22
Too high!
Enter a guess between 1 and 100 : 15
Too low!
Enter a guess between 1 and 100 : 18
Correct! You got it in 8 guesses!
To repeat 1-yes, 2-no. Enter choice:2
Thank you for using my program think about visiting again