29 Jan Friday Python Practice 19:30 – 23.01.27
Question 2: Continue modify the program we made in the class, so the moon and reflection on the ocean will move towards the right side of the screen. ...
Question 2: Continue modify the program we made in the class, so the moon and reflection on the ocean will move towards the right side of the screen. ...
Question: Using split and join function of the list to change string "green,red,yellow,blue," into string: "green light* red light* yellow light* blue light* " Hint: >>> vegetables = "carrots, potatoes, onions, leeks, celery" >>> # string.split(separator) will split the string by separator, for example: >>> vegetables = vegetables.split(", ") >>> print(vegetables) ['carrots', 'potatoes', 'onions',...
Question: A class has been divided into groups of three. This division into groups might violate two types of constraints: some students must work together in the same group, and some students must work in separate groups. Your job is to determine how many of the constraints...
You can do Question 1~ 3 in Python IDLE: Question 1. Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number! Question 2. Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up...
Question 1: You and your friend have come up with a way to send messages back and forth. Your friend can encode a message to you by writing down a positive integer N and a symbol. You can decode that message by writing out that symbol N times in a row...
Question: The Logging Company cuts a lot of trees. For management reasons, they want to produce a table of the total amount of wood cut every day. They have hired you, to help them produce the table. They’ve kept a log of trees logged, and they...