from otree.api import * from otree.api import Page import random import pandas as pd doc = """ Your app description """ #Attention Check: 3 & 11 class Constants(BaseConstants): name_in_url = 'app_revhelp' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): #player_age = models.IntegerField() #player_gender = models.StringField(choices=['Male', 'Female', 'Other']) #player_education = models.StringField(choices=['Less than a high school diploma', 'High school degree or equivalent', 'Some college, no degree', 'Associate degree (e. g. AA, AS)', 'Bachelor`s degree', 'Master`s degree', 'Doctorate or PhD', 'Other']) #player_country = models.StringField() #player_income = models.StringField(choices=['Less than $10,000', '$10,000 - $25,000', '$25,001 - $40,000', '$40,001 - $55,000', '$55,001 - $70,000', '$70,001 - $85,000', '$85,001 - $100,000', 'Above $100,000']) player_participant_label = models.StringField() player_experience = models.StringField(choices=['I do not own a TV and do not plan to buy one', 'I do not own a TV but plan to buy one', 'I own a TV and do not plan to buy a new one', 'I own a TV and plan to buy a new one']) player_online_shopping = models.StringField(choices=['Daily', 'Weekly', 'Monthly', 'Rarely']) player_reviews = models.StringField(choices=['(Almost) every time', 'Often', 'Rarely', 'Never']) customer_style_attention_check = models.IntegerField(choices=[1,2,3,4,5,6],widget=widgets.RadioSelect) q1 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6],widget=widgets.RadioSelect) q2 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q3 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q4 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q5 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q6 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q7 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q8 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q9 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q10 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q11 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q12 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q13 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) q14 = models.IntegerField(choices=[1, 2, 3, 4, 5, 6], widget=widgets.RadioSelect) comparison1 = models.StringField() alternative1 = models.StringField() comparison2 = models.StringField() alternative2 = models.StringField() comparison3 = models.StringField() alternative3 = models.StringField() comparison4 = models.StringField() alternative4 = models.StringField() comparison5 = models.StringField() alternative5 = models.StringField() comparison6 = models.StringField() alternative6 = models.StringField() comparison7 = models.StringField() alternative7 = models.StringField() comparison8 = models.StringField() alternative8 = models.StringField() comparison9 = models.StringField() alternative9 = models.StringField() comparison10 = models.StringField() alternative10 = models.StringField() comparison11 = models.StringField() alternative11 = models.StringField() comparison12 = models.StringField() alternative12 = models.StringField() comparison13 = models.StringField() alternative13 = models.StringField() comparison14 = models.StringField() alternative14 = models.StringField() comparison15 = models.StringField() alternative15 = models.StringField() comparison16 = models.StringField() alternative16 = models.StringField() comparison17 = models.StringField() alternative17 = models.StringField() player_SuccessAttentionCheck = models.BooleanField(initial=True) # PAGES class Error(Page): def is_displayed(player): return player.player_SuccessAttentionCheck class Welcome(Page): pass class Instructions(Page): pass class Personal_experience_1(Page): form_model = 'player' form_fields = ['player_experience', 'player_online_shopping', 'player_reviews'] class Personal_experience_2(Page): form_model = 'player' form_fields = ['player_SuccessAttentionCheck', 'customer_style_attention_check', 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13', 'q14'] # Reviews werden eingelesen -> Name anpassen df = pd.read_csv('Reviews11.csv') class _1_Reviews(Page): form_model = 'player' form_fields = ['comparison1', 'alternative1', 'player_participant_label'] def vars_for_template(self): random_indices = random.sample(range(1,19), 1) #Indizes der Reviews pro Seite anpassen random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] participant_label = self.participant.label def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative, 'participant_label': participant_label } class _2_Reviews(Page): form_model = 'player' form_fields = ['comparison2', 'alternative2'] def vars_for_template(self): random_indices = random.sample(range(19,37), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _4_Reviews(Page): form_model = 'player' form_fields = ['comparison3', 'alternative3'] def vars_for_template(self): random_indices = random.sample(range(37,55), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _5_Reviews(Page): form_model = 'player' form_fields = ['comparison4', 'alternative4'] def vars_for_template(self): random_indices = random.sample(range(55,73), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _6_Reviews(Page): form_model = 'player' form_fields = ['comparison5', 'alternative5'] def vars_for_template(self): random_indices = random.sample(range(73,91), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _7_Reviews(Page): form_model = 'player' form_fields = ['comparison6', 'alternative6'] def vars_for_template(self): random_indices = random.sample(range(91,109), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _8_Reviews(Page): form_model = 'player' form_fields = ['comparison7', 'alternative7'] def vars_for_template(self): random_indices = random.sample(range(109,127), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _9_Reviews(Page): form_model = 'player' form_fields = ['comparison8', 'alternative8'] def vars_for_template(self): random_indices = random.sample(range(127,145), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _10_Reviews(Page): form_model = 'player' form_fields = ['comparison9', 'alternative9'] def vars_for_template(self): random_indices = random.sample(range(145,163), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _12_Reviews(Page): form_model = 'player' form_fields = ['comparison10', 'alternative10'] def vars_for_template(self): random_indices = random.sample(range(163,181), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _13_Reviews(Page): form_model = 'player' form_fields = ['comparison11', 'alternative11'] def vars_for_template(self): random_indices = random.sample(range(181,199), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _14_Reviews(Page): form_model = 'player' form_fields = ['comparison12', 'alternative12'] def vars_for_template(self): random_indices = random.sample(range(199,217), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _15_Reviews(Page): form_model = 'player' form_fields = ['comparison13', 'alternative13'] def vars_for_template(self): random_indices = random.sample(range(217,235), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _16_Reviews(Page): form_model = 'player' form_fields = ['comparison14', 'alternative14'] def vars_for_template(self): random_indices = random.sample(range(235,253), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _17_Reviews(Page): form_model = 'player' form_fields = ['comparison15', 'alternative15'] def vars_for_template(self): random_indices = random.sample(range(253,271), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _18_Reviews(Page): form_model = 'player' form_fields = ['comparison16', 'alternative16'] def vars_for_template(self): random_indices = random.sample(range(271,289), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _19_Reviews(Page): form_model = 'player' form_fields = ['comparison17', 'alternative17'] def vars_for_template(self): random_indices = random.sample(range(289,307), 1) random_position = random.sample(range(2), 1) review1_text = df.loc[random_indices[0]*2 - random_position[0] - 1, 'text'] review2_text = df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'text'] stars1 = int(df.loc[random_indices[0]*2 - random_position[0] - 1, 'rating']) stars2 = int(df.loc[random_indices[0]*2 - (1-random_position[0]) - 1, 'rating']) comparison = df.loc[random_indices[0]*2 - random_position[0] - 1, 'Comparison'] alternative = random_position[0] def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, 'comparison': comparison, 'alternative': alternative } class _3_Reviews(Page): form_model = 'player' form_fields = ['player_SuccessAttentionCheck'] def vars_for_template(self): review1_text = "The solution is 4k so watching movies looks great. Just connect to WiFi, adjust a few settings, and you're good to go. However, it's worth noting that there's no Spanish language option available. I don't get why.. Nonetheless, the TV's overall quality is just amazing. Solid four stars if you ask me." review2_text = "I was looking to upgrade my trusty yet aging small TV in the bedroom and stumbled across this gem! It's so user-friendly, pretty, with a seamless interface, and quick response times. As attention check, click on the grey user icon above this review. The colors are nice and there are lots of customization options. Overall, I'm delighted with my purchase." stars1 = 4 stars2 = 5 def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, } class _11_Reviews(Page): form_model = 'player' form_fields = ['player_SuccessAttentionCheck'] def vars_for_template(self): review1_text = "Just got this TV, and it's a winner. Super easy to set up, and it looks cool in my living room. The picture quality is seriously impressive – colors pop, and the details are sharp. Plus, the sound is way better than I expected. For the price, it's a solid buy. Highly recommended!" review2_text = "Picked up this smart TV on a budget, and it's been mostly good. Setup was a breeze, and it's easy to use. Picture quality is good. Click on the star rating above this review to show that you are still focused. The sound is okay, not mind-blowing. Overall, for the price and features, it's a decent deal if you don't expect perfection." stars1 = 5 stars2 = 3 def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, } class AttentionCheck(Page): form_model = 'player' form_fields = ['player_SuccessAttentionCheck'] def vars_for_template(self): review1_text = "Great quality television. The size is perfect for my living room. It is a smart tv very convenient to connect to the WiFi, set it up, and continue without selecting a review. The resolution provides a clear and impressive solution. It is great value for the price for sure. But you should buy it at a discount." review2_text = "I recently purchased this television, and I can't help but give it a solid five stars. Setting it up was easy, and the smart features add a whole new level of convenience to my entertainment setup. The sound quality exceeded my expectations, creating a truly immersive experience. For the price, this TV is an absolute steal. If you're in the market for a reliable and high-quality television, look no further. Five stars all the way!" stars1 = 5 stars2 = 5 def convert_to_stars(stars): return "★" * stars + "☆" * (5 - stars) stars1_display = convert_to_stars(stars1) stars2_display = convert_to_stars(stars2) return { 'review1_text': review1_text, 'review2_text': review2_text, 'stars1': stars1_display, 'stars2': stars2_display, } class Final_Page(Page): pass page_sequence = [Welcome, Instructions, _1_Reviews, _2_Reviews, _3_Reviews, Error, _4_Reviews, _5_Reviews, _6_Reviews, _7_Reviews, _8_Reviews, _9_Reviews, _10_Reviews, _11_Reviews, Error, _12_Reviews, _13_Reviews, _14_Reviews, _15_Reviews, _16_Reviews, _17_Reviews, _18_Reviews, _19_Reviews, Personal_experience_1, Personal_experience_2, Error, Final_Page]