When buying a Tesla Model 3, you have a choice between three versions/trims: 1) Standard Range Plus, 2) Long Range, and 3) Performance. All trims have the same base features, but the 2nd trim includes additional features, and the 3rd trim adds features on top of those from #2. In other words, the feature list is incremental.
Write a program that asks the user to choose which Model 3 they want to buy. You will then output the feature list based on the user's selection. So that you understand which feature list belongs to each, my example below is for the most expensive trim (Performance), which includes everything. I used an empty line to separate the features for each trim. Be sure to reject invalid menu choices.
Menu/Prompts:
Enter the letter that corresponds to your desired Tesla Model 3 from the choices below:
[S]tandard Range Plus
[L]ong Range
[P]erformance
Enter your choice: [Assume user enters P]
Output for 'P':
New Dictionary
Peter is making a new dictionary.He wants to arrange the words in the ascending order of their length and later arrange the ones with the same length in lexicographic order.Each word is given a serial number according to its position.Find the word according to the serial number.
Input
The first line of input is a positive integer which is the serial number.
Output
The output should be a single line containing the word that represents the serial number.
Explanation
Given serial number is 42.
As the serial number is between 26 and 52, the first character of the word is A.The remaining counter of the serial number is 16 (42-26).
The second character of the word is the 16th alphabet, which is P.
So, the output should be AP.
Sample Input1
42
Sample Output1
AP
Sample input2
751
Sample output2
ABW
Using Enumeration type
Sample Run 1:
Enter the measurement of the sides of the triangle: 3 4 5
The triangle is an example of scalene triangle.
Sample Run 2:
Enter the measurement of the sides of the triangle: 10 10 8
The triangle is an example of isosceles triangle.
Sample Run 3:
Enter the measurement of the sides of the triangle: 10 10 10
The triangle is an example of equilateral triangle.
Sample Run 4:
Enter the measurement of the sides of the triangle: 10 1 2
The triangle is an example of notriangle triangle.
Javascripts: 1. Create a script that asks users to input names in a text field. Sort the names and display them in a seperate text area. 2. If the user enters an empty name, show the text field in red color. Also display an alert box. Change the color to white when a non empty name is eneterd. 3. Add shortcut keys to text area. When user presses Ctrl+Enter, change the font style of text in text area to italic. When user presses Shift+Enter, change the font style of text area to normal. I have added a demo in Iris. Attach the html and screenshots.
Input numbers from the user and find the sum of all those input numbers until the user
inputs zero. In other means, the loop should end when the user enters 0. Finally, display the
sum of all those numbers entered by the user.
Take input of your registration number in the University. Write a programme to print all the
prime numbers digits in your registration number.
Write a shell script using while loop to repeat something several times for several things.
Write a shell script to display a file content on screen passed as command line argument
write a python function Check_RollNo(A, n) (Refer RollNo_W8B_3.py ) which take a list A and nth roll number as input and return first nth roll number and Second roll number from the nth last roll number as shown in example. If nth roll number is not lies in the range of list, then function will return "n is not in range" in place of first roll number and empty string (“”) in place of second roll number
Write a program to take a String as input then display the position of a particular character given as input using indexOf() function of String class. Don't use charAt() function.
Enter a String
Elephants are the largest mammals
Enter character to find: e
Index Position: 0 2 12 16 22