Skip to content

Commit 3f08258

Browse files
authored
Update 10-basic-exercise.md
1 parent 90d5068 commit 3f08258

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

Exercises-And-Solutions/exercises/10-basic-exercise.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Create Bill Calculator.
44

5-
Ask below Questions
5+
Ask below questions:
66

77
1. How many french fries (60rs per piece) do you want to order ?
88
2. How many burgers (50rs per piece) do you want to order ?
@@ -28,9 +28,9 @@ $
2828

2929
Ask the user question "How many times do you want to print Series". Then print below series. For example below series will be printed if user enteres 5
3030

31-
2, 6, 30, 260, 3130
31+
`2, 6, 30, 260, 3130`
3232

33-
Find the pattern for above series and print accordingly. If the user enters 10 then we will print the same series numbers total 10 times.
33+
Find the pattern for above series and print accordingly. If the user enters 10 then we will print the same series total 10 times.
3434

3535
### Question 4
3636

@@ -39,39 +39,38 @@ Using a switch case to do the below exercise:
3939
- If number is odd then print "Odd"
4040
- If number is even then print "Even"
4141
- If number is 100 then print "100"
42-
- Else print 10000
42+
- Else print "10000"
4343

4444
### Question 5
4545

4646
Ask user his/her birth year, "What is your birth year?"
4747

4848
If user age is greater than 18 then ask user "Do you have valid license number?"
49-
If user click on Okay then ask for his license number and finally in the alert show message "User with license number #### is ready to drive."
49+
If user click on "Okay" button then ask for his license number and finally in the alert show message "User with license number #### is ready to drive.".
5050

51-
If user age is less than 18 then ask him question in confirm box "Do you have gaurdians ?""
52-
If user says yes then ask his/her Gaurdian name and then in alert show "You are ready to drive with your #### (show gaurdian name here.)"
51+
If user age is less than 18 then ask him question in confirm box "Do you have gaurdians?"
52+
If user says yes then ask his/her Gaurdian name and then in alert show "You are ready to drive with your #### (show gaurdian name here.)"
5353
Else show "Sorry visit again please." in alert box
5454

5555
### Question 6
5656

57-
Take any number and take other number as 19. Now check their difference by subtracting each other. If both numbers difference is greater than 19
58-
then print triple their absolute difference else print double their absolute difference.
57+
Take any number and take other number as 19. Now check their difference by subtracting each other. If both numbers difference is greater than 19 then print triple their absolute difference else print the double of their absolute difference.
5958

6059
### Question 7
6160

6261
Write a JavaScript program to check from two given integers, whether one is positive and another one is negative.
6362

64-
If yes then print sum of both the numbers
63+
If "yes" then print sum of both the numbers
6564
Else print multiplication of both numbers
6665

6766
### Question 8
6867

69-
Write a JavaScript program to check if out of 4 numbers any two numbers are same or not. If yes then print Yes else print No.
68+
Write a JavaScript program to check if out of 4 numbers any of two numbers are same or not. If yes then print "Yes" else print "No".
7069

7170
### Question 9
7271

73-
Write a program to check if a number is palindrome or not. It means 141 and 12221 both are examples of palindrome number. If number is palindrome then print yes else print no
72+
Write a program to check if a number is palindrome or not. It means 141 and 12221 both are examples of palindrome number. If number is palindrome then print "yes' else print "no".
7473

7574
### Question 10
7675

77-
Take a String and check its length. If string length is greater than 10 then print from 1 to length of the string. else print No
76+
Take a String and check its length. If string length is greater than 10 then print from 1 to length of the string else print No.

0 commit comments

Comments
 (0)