Skip to main content
Indietro

Decision and Repetition Structures in Python Programming

Guida di studio - Domande di pratica

Metti alla prova le tue conoscenze con domande di pratica generate dai tuoi appunti

  • #1 Scelta multipla
    Which of the following best describes a decision structure in programming?
  • #2 Scelta multipla
    Given the following code, what will be the output if the user enters 25 for 'hours' and 10 for 'pay_rate'? if hours > 40: overtime_hours = hours - 40 overtime_pay = overtime_hours * pay_rate * 1.5 gross_pay = 40 * pay_rate + overtime_pay else: gross_pay = hours * pay_rate print('The gross pay is $', format(gross_pay, ',.2f'), sep='')
  • #3 Scelta multipla
    Which of the following Boolean expressions will evaluate to True if $x = 5$ and $y = 10$?

Study guide - Flashcard

Aumenta la memorizzazione e fissa i concetti chiave con le flashcard create direttamente dai tuoi appunti.

  • Decision Structures and Boolean Logic
    21 Domande
  • Repetition Structures
    18 Domande