choice "6" 2 if choice "5": 3 print(choice) 4 elif choice "6": 5- try: sql - "*"INSERT INTO students(student_id, student_name, student Tastname, 7. 8. student email, student DOB, major_id) VALUES(?, 2, 2, ?, 2, ?)** input ("Enter a student ID: ") stud id stud name input ("Enter a name: ") stud lastname - input ("Enter Last name: ") stud email - input("Enter email address: ") stud DOB - input ("Enter DOB 1n (MM-DD-YYYY) format: ") 9. 10 11 12 13 14 cursor.execute(sql, (stud id, stud_name, stud_lastname, stud email, stud DOB, 206)) 15 A 16 A17 cursor.execute(sql, (23593043, "Greg", "Moyers", "gmeyers@test.com", "06-10-1997, 206)) cursor.commit() 18 19 20- еxcept: print("Try again") 21

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter4: Constraints
Section: Chapter Questions
Problem 3MC: Which of the following SQL statements is invalid and returns an error message? ALTER TABLE books ADD...
icon
Related questions
icon
Concept explainers
Question

please help me! please do this code over to show the correct output in the console. please show screenshot with every line of code with correct output in the console. 

 
1 choice = "6"
2 if choice "5":
print(choice)
4- elif choice "6" :
5-
try:
sql
7.
8.
9.
*INSERT INTO students (student_id, student_name, student_Tastname,
student email, student DOB, major_id) VALUES(?, 2, ?, ?, 2, ?)***
stud id - input("Enter a student ID: ")
stud_name- input("Enter a name: ")
stud lastname = input ("Enter Last name: ")
stud email - input("Enter email address: ")
stud DOB - input ("Enter DOB in (MM-DD-YYYY) format: ")
10
11
12
13
14
cursor.execute(sq1,(stud_id, stud_name, stud_lastname, stud email, stud D08, 206))
15
A16
17
cursor.execute(sql, (23593043, "Greg", "Moyers", "gmeyersetest.com", "06-10-1997, 206))
cursor.commit ()
18
19
except:
print("Try again")
20-
21
Enter a student ID: 2593043
Enter a name: Greg
Enter Last name: Meyers
Enter email address: gmeyers@test.com
Enter DOB in (MM-DD-YÝYY) format: 06-10-1997
Try again
1234 n67
Transcribed Image Text:1 choice = "6" 2 if choice "5": print(choice) 4- elif choice "6" : 5- try: sql 7. 8. 9. *INSERT INTO students (student_id, student_name, student_Tastname, student email, student DOB, major_id) VALUES(?, 2, ?, ?, 2, ?)*** stud id - input("Enter a student ID: ") stud_name- input("Enter a name: ") stud lastname = input ("Enter Last name: ") stud email - input("Enter email address: ") stud DOB - input ("Enter DOB in (MM-DD-YYYY) format: ") 10 11 12 13 14 cursor.execute(sq1,(stud_id, stud_name, stud_lastname, stud email, stud D08, 206)) 15 A16 17 cursor.execute(sql, (23593043, "Greg", "Moyers", "gmeyersetest.com", "06-10-1997, 206)) cursor.commit () 18 19 except: print("Try again") 20- 21 Enter a student ID: 2593043 Enter a name: Greg Enter Last name: Meyers Enter email address: gmeyers@test.com Enter DOB in (MM-DD-YÝYY) format: 06-10-1997 Try again 1234 n67
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning