CBT IT Certification Training

Unlimited IT Certification Courses via Streaming Video

Login to this site requires ssl communication.
Click here to reload the page over ssl.

  • Lost your password?

  • Back to login
Loading
Login to this site requires ssl communication.
Click here to reload the page over ssl.

  • Lost your password?

  • Back to login
Loading
  • Home
  • Courses
        • Amazon
          • Solutions Architect
          • SysOps Associate
        • CompTIA
          • A+
          • Cloud Essentials
          • Linux+
          • Network+
          • PenTest+
          • Project+
          • Security+
          • Storage+
        • Juniper
          • JNCIA-Junos
          • JNCIA-SEC
          • JNCIS-ENT
          • JNCIS-SEC
        • TCP-IP
          • IP Subnetting
          • IPv6 Network Associate
          • IPv6 Network Professional
          • IPv6 Network Expert
        • Career
          • How to Break into IT
          • IT Freelancing/Contracting
          • Ace Your IT Exams
        • DevOps
          • DevOps Foundations
          • Docker Basics
        • Linux
          • CompTIA Linux+
          • Linux LPI Essentials
          • Linux LPIC1 Exam 101
          • Linux LPIC1 Exam 102
        • VMware
          • VCA Data Center
        • Cisco
          • CCNA Primer
          • CCNA Exam Coaching
          • CCNA
          • CCNP ENARSI
          • CCNP ENCOR Primer
          • CCNP ENCOR
          • CyberOps Associate
          • DevNet Associate
        • Google
          • Cloud Architect
        • Microsoft
          • MTA Database
          • MTA Python
          • MTA Windows 10
          • MTA Server
          • MTA Security
          • Azure Fundamentals
          • Azure Administrator
          • Azure Developer
        • Wireshark
          • WCNA
        • Cloud Computing
          • Amazon AWS Associate
          • AWS Sysops Associate
          • CompTIA Cloud Essentials
          • Google Cloud Architect
          • Azure Fundamentals
          • Azure Administrator
        • ITIL
          • ITIL Foundations
        • Security
          • Cisco CyberOps Associate
          • CompTIA Security+
          • Certified Ethical Hacker
          • Juniper JNCIA-SEC
          • Juniper JNCIS-SEC
          • Microsoft MTA Security
        • Web Development
          • PhP Fundamentals
          • CSS Fundamentals
          • HTML Fundamentals
          • MySQL Fundamentals
          • JavaScript Fundamentals
          • Learn Python From Scratch
  • Racks
    • vRack
    • Live Cisco Racks
  • Tour
  • Join
  • Join
  • Free Training
  • Meet the Trainers
  • Help
    • Helpdesk
    • FAQ
    • Contact Us
    • Privacy
  • Products
    • Books
    • Audiobooks
    • My Products
  • Login
  • Members
    • Account
    • Exam Coaching
    • Exams
    • Forum
    • Live Cisco Rack Training
    • Members Training
    • Member Bonuses
    • My Courses
    • Nuggets
  • Home
  • Courses
        • Amazon
          • Solutions Architect
          • SysOps Associate
        • CompTIA
          • A+
          • Cloud Essentials
          • Linux+
          • Network+
          • PenTest+
          • Project+
          • Security+
          • Storage+
        • Juniper
          • JNCIA-Junos
          • JNCIA-SEC
          • JNCIS-ENT
          • JNCIS-SEC
        • TCP-IP
          • IP Subnetting
          • IPv6 Network Associate
          • IPv6 Network Professional
          • IPv6 Network Expert
        • Career
          • How to Break into IT
          • IT Freelancing/Contracting
          • Ace Your IT Exams
        • DevOps
          • DevOps Foundations
          • Docker Basics
        • Linux
          • CompTIA Linux+
          • Linux LPI Essentials
          • Linux LPIC1 Exam 101
          • Linux LPIC1 Exam 102
        • VMware
          • VCA Data Center
        • Cisco
          • CCNA Primer
          • CCNA Exam Coaching
          • CCNA
          • CCNP ENARSI
          • CCNP ENCOR Primer
          • CCNP ENCOR
          • CyberOps Associate
          • DevNet Associate
        • Google
          • Cloud Architect
        • Microsoft
          • MTA Database
          • MTA Python
          • MTA Windows 10
          • MTA Server
          • MTA Security
          • Azure Fundamentals
          • Azure Administrator
          • Azure Developer
        • Wireshark
          • WCNA
        • Cloud Computing
          • Amazon AWS Associate
          • AWS Sysops Associate
          • CompTIA Cloud Essentials
          • Google Cloud Architect
          • Azure Fundamentals
          • Azure Administrator
        • ITIL
          • ITIL Foundations
        • Security
          • Cisco CyberOps Associate
          • CompTIA Security+
          • Certified Ethical Hacker
          • Juniper JNCIA-SEC
          • Juniper JNCIS-SEC
          • Microsoft MTA Security
        • Web Development
          • PhP Fundamentals
          • CSS Fundamentals
          • HTML Fundamentals
          • MySQL Fundamentals
          • JavaScript Fundamentals
          • Learn Python From Scratch
  • Racks
    • vRack
    • Live Cisco Racks
  • Tour
  • Join
  • Join
  • Free Training
  • Meet the Trainers
  • Help
    • Helpdesk
    • FAQ
    • Contact Us
    • Privacy
  • Products
    • Books
    • Audiobooks
    • My Products
  • Login
  • Members
    • Account
    • Exam Coaching
    • Exams
    • Forum
    • Live Cisco Rack Training
    • Members Training
    • Member Bonuses
    • My Courses
    • Nuggets

ty76

August 3, 2020 By Paul Browning

1.

The following code has an error, which code should you use to fix it?

def multiply_together(a,b,c):
  return a * B * c

x = multiply_together(7,7,7)
print(x)

Question 1 of 10

2.

The following code has an error, which line is it on?

1: f=open(input("Enter a filename: "))
2: 
3: while True:
4:    line=f.readline()
5:   
6:    if line == ""
7:        break
8:    else:
9:        print(line)

Question 2 of 10

3.

The following code has an error, which line is it on?

 1: ourlist = ['S','O','T','Z','P','M']
 2: 
 3: def letterac(name,bound=2,letters):
 4:    #Add the letters together
 5:    result = 0
 6:    timesdone = 0
 7:    for letter in letters:
 8:        if letter in name:
 9:            while timesdone <= bound:
10:                result += 1
11:                timesdone += 1
12:    return result
13: 
14: 
15: print(letterac("JAMES",2,ourlist))

Question 3 of 10

4. Which exception will the following code raise?

z = 5+8+”9”

Question 4 of 10

5. You need to handle an exception for opening a file, how do you do it?

Question 5 of 10

6.

Look at the following code - what line is the error on?

 1: items = []
 2: 
 3: def getdata():
 4:    item = input("Enter a grade: ")
 5:    items.append(item)
 6: 
 7: def getaverage(items):
 8:    sum = 0
 9:    for i in items:
10:        sum += i
11:    return round(sum/len(items))
12: 
13: i = 3
14: for v in range(1,5):
15:    getdata()
16: print(getaverage(items))

Question 6 of 10

7. You need to catch two errors, TypeError and ZeroDivisionError. How would you code this?

Question 7 of 10

8. You’re creating a new class to catch exceptions, which code do you use?

Question 8 of 10

9.

The following code has an error, which exception will be raised?
f = open(‘number.txt’)
f.readall()

Question 9 of 10

10.

The following code has an error, which exception will be raised?

i = 3

for v in i:
  pass

Question 10 of 10

Loading... Loading...

 

Filed Under: Uncategorized

Copyright Reality Press Ltd . / Paul Browning