![]() I was just wondering whether anyone could have a look through my code to see which areas I can improve on.Īlso I am struggling to add more than one item to the lists for car, bike and truck. Public List bikeList(motorbike Mynewbike) Searchchoice = Console.ReadLine().ToLower() Ĭonsole.WriteLine("Car in inventory: ", truckMake, truckModel, truckColour) Ĭonsole.WriteLine("Sorry, invalid selection") Select Add Contacts or tap the plus icon in the top corner. Tap your new list to open it and begin adding contacts. Type a name for your list, then tap Done on your keyboard to save the name. ![]() a 1,'abc',3.26,'d' To add an element to the list, we can use 3 built in functions: a) insert (index,object) This method can be used to insert the object at the preferred index position.For eg, to add an element '20' at the index 1: a. Tap Add Lists to create a new email group. List is one of the most important data structure in python where you can add any type of element to the list. lour = Console.ReadLine().ToLower() Ĭonsole.WriteLine("select Car, Motobike or truck to search?") From your main contacts list, tap Lists in the upper-left corner. Mynewtruck.model = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the trucks colour") Mynewtruck.make = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the trucks model") lour = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the trucks make") Mynewbike.model = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the motorbike colour") ![]() Mynewbike.make = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the motorbike model") ![]() lour = Console.ReadLine().ToLower() Ĭonsole.WriteLine("what is the motorbike make") Mynewcar.model = Console.ReadLine().ToLower() Ĭonsole.WriteLine("What is the car Colour?") Mynewcar.make = Console.ReadLine().ToLower() Ĭonsole.WriteLine("What is the car model?") Static void Main(string carMake, string carModel, string carColour, string bikeModel, string bikeMake, string bikeColour, string truckMake, string truckModel, string truckColour)Ĭonsole.WriteLine("What service do you need") Ĭonsole.WriteLine("What is the car make?") ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |