You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Exercises-And-Solutions/exercises/10-basic-exercise.md
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Create Bill Calculator.
4
4
5
-
Ask below Questions
5
+
Ask below questions:
6
6
7
7
1. How many french fries (60rs per piece) do you want to order ?
8
8
2. How many burgers (50rs per piece) do you want to order ?
@@ -28,9 +28,9 @@ $
28
28
29
29
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
30
30
31
-
2, 6, 30, 260, 3130
31
+
`2, 6, 30, 260, 3130`
32
32
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.
34
34
35
35
### Question 4
36
36
@@ -39,39 +39,38 @@ Using a switch case to do the below exercise:
39
39
- If number is odd then print "Odd"
40
40
- If number is even then print "Even"
41
41
- If number is 100 then print "100"
42
-
- Else print 10000
42
+
- Else print "10000"
43
43
44
44
### Question 5
45
45
46
46
Ask user his/her birth year, "What is your birth year?"
47
47
48
48
If user age is greater than 18 then ask user "Do you have valid license number?"
49
-
If user click on Okaythen 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.".
50
50
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.)"
53
53
Else show "Sorry visit again please." in alert box
54
54
55
55
### Question 6
56
56
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.
59
58
60
59
### Question 7
61
60
62
61
Write a JavaScript program to check from two given integers, whether one is positive and another one is negative.
63
62
64
-
If yes then print sum of both the numbers
63
+
If "yes" then print sum of both the numbers
65
64
Else print multiplication of both numbers
66
65
67
66
### Question 8
68
67
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".
70
69
71
70
### Question 9
72
71
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".
74
73
75
74
### Question 10
76
75
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