This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
week_temps_f = "75.1,77.7,83.2,82.5,81.0,79.5,85.7" | |
temp_list = week_temps_f.split(',') #converting string into a list | |
lst=[float(i) for i in temp_list] #converting string values of list into float | |
avg_temp = sum(lst)/len(lst) #calculating average |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct Node | |
{ | |
int data; | |
Node *next; | |
}; | |
class link | |
{ | |
public: |